1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
use clap::{Parser, Subcommand};

/// Simple program to greet a person
#[derive(Parser, PartialEq, Debug)]
#[clap(author = "Neosb @museyoucoulduse <museyoucoulduse@gmail.com>", version, about = "\nThe only h@xor tool you will ever need πŸ₯·. Made by Neosb under MIT license, so open source πŸ‘©πŸ»β€πŸ’» and free πŸ’Έ. Extend with Kali Linux and Debian packages indefinietly πŸš€, run under Docker where you please 🐳", long_about = r#"
The only h@xor tool you will ever need πŸ₯·. Made by Neosb under MIT license, so open source πŸ‘©πŸ»β€πŸ’» and free πŸ’Έ. Extend with Kali Linux and Debian packages indefinietly πŸš€, run under Docker where you please 🐳
    
Start instance of nutek-core:slim docker container in your terminal.

Available tools:
πŸ₯· Kali Linux                from docker image kalilinux/kali-rolling:latest
πŸ₯· recent2                   bash commands history in SQLite
πŸ₯· curl & wget               web interactions tools, wget to download, and curl to
    see what web request response is. Can be used to interct with API's
πŸ₯· Python 3.10               general purpose programming language (https://python.org)
πŸ₯· Perl 5                    another programming language (https://www.perl.org/) with gray hairs, 
    still in use in some places
πŸ₯· PayloadsAllTheThings      payloads to use in exploiting vulnerabilites
    look in /usr/share/payloadsallthethings folder
πŸ₯· Ncat                      'is a feature-packed networking utility which reads and writes data 
    across networks from the command line' (https://nmap.org/ncat/)
πŸ₯· NeoVim                    terminal based text-editor ready to extend. Vim compatible.
πŸ₯· w3m                       command line web browser
πŸ₯· mitmproxy                 woman in the middle proxy to forward web traffic through
    fire it up and go to http://mitm.it/, follow instructions to install certificate
    check up manual on https://docs.mitmproxy.org/stable/
πŸ₯· hURL                      encode/decode text and files
πŸ₯· Nmap                      network port scanner https://nmap.org/book/man.html
πŸ₯· Git                       track code changes and progress around your circle, 
    share with others https://git-scm.com/
πŸ₯· Feroxbuster               discover, fuzz, deep 
    https://epi052.github.io/feroxbuster-docs/
πŸ₯· SecLists                  lists used for discovery, recon, reaserch, vulnerability
    scanning and so on /usr/share/seclists
πŸ₯· tcpdump                   uncover mystery of network packets https://www.tcpdump.org/
πŸ₯· Vulscan                   search for vulnerabilities https://www.computec.ch/projekte/vulscan/
πŸ₯· Smap                      faster version of nmap - no touch https://github.com/s0md3v/smap
πŸ₯· Xh                        create http payloads and requests https://github.com/ducaale/xh

Neosb & 😼 https://neosb.marketplaceinspace.com
"#)]
pub struct Args {
    /// Name of the docker container
    #[clap(short, long, value_parser, default_value = "nutek-core")]
    pub name: String,

    /// Restart previously stopped container by providing it's name
    #[clap(short, long, value_parser)]
    pub start: Option<String>,

    /// Host port to equivalent docker port 8080 used by mitmproxy
    #[clap(short, long, value_parser)]
    pub port: Option<u16>,

    /// Execute command you wish to run;
    /// if your desired command is in scope of this
    /// program command line arguments use this syntax:
    /// --run-command="nmap --help"
    #[clap(short, long, value_parser)]
    pub run_command: Option<String>,

    /// If to remove docker container after exit
    #[clap(long, action, default_value_t = false)]
    pub rm: bool,

    /// List docker containers
    #[clap(long, action, default_value_t = false)]
    pub ls: bool,
    
    /// Remove old container by name, 
    /// for example when you want to have new version of Nutek
    #[clap(long, value_parser)]
    pub remove_old: Option<String>,

    /// GitHub repository
    #[clap(long, action, default_value_t = false)]
    pub github: bool,
    
    #[clap(subcommand)]
    pub command: Option<Commands>,
}

#[derive(Subcommand, PartialEq, Debug)]
pub enum Commands {
    /// Run mitmproxy, woman in the middle proxy for web sniffing,
    /// capturing requests and changing them on the fly. You can
    /// also script it's usage with Python
    Mitmproxy {
        /// run mitmdump only
        // #[clap(short, long, action)]
        // mitmdump: bool,

        /// Host port to equivalent docker port 8080 used by mitmproxy
        #[clap(short, long, value_parser, default_value_t = 8080)]
        port: u16,

        /// Provide your command line arguments to Mitmproxy
        #[clap(short, long, value_parser)]
        arguments: Option<String>,

        /// For convinience if you want to specify your own container
        /// proxy port this argument sets it in relation 1:1.
        /// For clarification, default mitmproxy prot is 8080, so
        /// this argument also defaults to 8080 🦊
        #[clap(long, value_parser, default_value_t = 8080)]
        container_port: u16,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// Run NeoVim, command line text editor compatibile with Vim.
    /// Extendable wit power of Vim modules and Lua.
    Nvim {
        /// Command line arguments for NeoVim
        #[clap(short, long, value_parser)]
        arguments: Option<String>,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// Run, script, develop in Python programming languge using Nutek!
    /// NeoVim extensions included for seemless integration into your
    /// workflow. Use one tool instead of many.
    /// 
    /// Visit https://www.python.org/ for more information or jump in
    /// and start your hacking journey...
    Python {
        /// Run Python script from container.
        /// External script can be run by placing desired script in 
        /// .nutek/python folder in your home directory and calling
        /// either /root/.nutek/python/your_script.py or ~/.nutek/python/my_script.py
        #[clap(short, long, value_parser)]
        run: Option<String>,

        /// Python REPL, Read, Evaluate, Print, Loop e.g. shell
        #[clap(long, action, default_value_t = true)]
        repl: bool,

        /// Run inline Python script from command line string
        /// e.g. 'print("Hello Nutek!")' mark the quotes - you need 'em
        /// /// escape them with backslash \' if you need more
        #[clap(short, long, value_parser)]
        inline: Option<String>,

        /// Provide your command line arguments to Python
        #[clap(short, long, value_parser)]
        arguments: Option<String>,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// Old wizard, gray raven, wise, proficient in language processing,
    /// used in many places all around the globe neat programming language.
    /// Perl is here.
    Perl {
        /// Run perl script from container.
        /// External script can be run by placing desired script in 
        /// .nutek/perl folder in your home directory and calling
        /// either /root/.nutek/perl/your_script.pl or ~/.nutek/perl/my_script.pl
        #[clap(short, long, value_parser)]
        run: Option<String>,

        /// Run inline Perl script from command line string
        /// e.g. 'print "Hello Nutek!\n"' mark the quotes - you need 'em
        /// escape them with backslash \' if you need more
        #[clap(short, long, value_parser)]
        inline: Option<String>,

        /// Provide your command line arguments to Perl
        #[clap(short, long, value_parser)]
        arguments: Option<String>,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// Vulerability scanner based on nmap
    Vulscan {
        /// Host
        #[clap(long, value_parser, required = true)]
        host: String,
    },
    /// Faster and 'no touch' version of nmap which use Shodan,
    /// no connection between you and the target
    Smap {
        /// Host
        #[clap(long, value_parser, required = true)]
        host: String,

        /// Argument
        #[clap(short, long, value_parser)]
        argument: Option<String>,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// Scan network for open ports and services
    Nmap {

    },
    /// Interact with web through api and http requests
    Curl {

    },
    /// Download
    Wget {

    },
    /// All purpose networking tool
    /// how does it work? IDK, just bind the shell ;)
    Ncat {
        /// Port
        #[clap(short, long, value_parser, default_value_t = 9001)]
        port: u16,

        /// Listen
        #[clap(long, action, default_value_t = false)]
        listen: bool,

        /// Listen using TLS/SSL
        #[clap( long, action, default_value_t = false)]
        tls: bool,

        /// Bind
        #[clap(long, value_parser)]
        bind: Option<String>,

        /// Bind command, most commonly shell
        #[clap(long, value_parser, default_value = "sh")]
        shell: String,

        /// Help
        #[clap(long, action, default_value_t = false)]
        display_help: bool
    },
    /// encode/decode strings and files
    Hurl {

    },
    /// Terminal based web browser
    W3m {

    },
    /// Display info about available options for
    /// doing any kind of app/library development
    Programming {

    },
    /// Easy cURL
    Xh {

    },
    /// Fuzzing & discovery on the websites
    Feroxbuster {

    },
    /// Version Control System which powers
    /// Github, Gitlab, Bitbucket, Gitea and many more
    Git {

    },
    /// Options to grow
    Extendability {

    },
    /// Mitmproxy younger brother
    Mitmdump {

    },
    /// Network packet sniffing tool
    Tcpdump {

    },
}