ronin-masscan 0.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.document +4 -0
  3. data/.github/workflows/ruby.yml +47 -0
  4. data/.gitignore +14 -0
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +11 -0
  7. data/.ruby-version +1 -0
  8. data/.yardopts +1 -0
  9. data/COPYING.txt +165 -0
  10. data/ChangeLog.md +10 -0
  11. data/Gemfile +40 -0
  12. data/README.md +204 -0
  13. data/Rakefile +43 -0
  14. data/bin/ronin-masscan +34 -0
  15. data/data/completions/ronin-masscan +83 -0
  16. data/data/templates/script.rb.erb +43 -0
  17. data/gemspec.yml +42 -0
  18. data/lib/ronin/masscan/cli/command.rb +40 -0
  19. data/lib/ronin/masscan/cli/commands/completion.rb +61 -0
  20. data/lib/ronin/masscan/cli/commands/convert.rb +133 -0
  21. data/lib/ronin/masscan/cli/commands/dump.rb +194 -0
  22. data/lib/ronin/masscan/cli/commands/grep.rb +235 -0
  23. data/lib/ronin/masscan/cli/commands/import.rb +94 -0
  24. data/lib/ronin/masscan/cli/commands/new.rb +203 -0
  25. data/lib/ronin/masscan/cli/commands/print.rb +162 -0
  26. data/lib/ronin/masscan/cli/commands/scan.rb +206 -0
  27. data/lib/ronin/masscan/cli/filtering_options.rb +312 -0
  28. data/lib/ronin/masscan/cli/importable.rb +68 -0
  29. data/lib/ronin/masscan/cli/port_list.rb +102 -0
  30. data/lib/ronin/masscan/cli.rb +50 -0
  31. data/lib/ronin/masscan/converter.rb +129 -0
  32. data/lib/ronin/masscan/converters/csv.rb +108 -0
  33. data/lib/ronin/masscan/converters/json.rb +142 -0
  34. data/lib/ronin/masscan/converters.rb +54 -0
  35. data/lib/ronin/masscan/exceptions.rb +47 -0
  36. data/lib/ronin/masscan/importer.rb +214 -0
  37. data/lib/ronin/masscan/root.rb +28 -0
  38. data/lib/ronin/masscan/version.rb +26 -0
  39. data/lib/ronin/masscan.rb +114 -0
  40. data/man/ronin-masscan-completion.1 +76 -0
  41. data/man/ronin-masscan-completion.1.md +78 -0
  42. data/man/ronin-masscan-convert.1 +37 -0
  43. data/man/ronin-masscan-convert.1.md +40 -0
  44. data/man/ronin-masscan-dump.1 +116 -0
  45. data/man/ronin-masscan-dump.1.md +94 -0
  46. data/man/ronin-masscan-grep.1 +56 -0
  47. data/man/ronin-masscan-grep.1.md +59 -0
  48. data/man/ronin-masscan-import.1 +52 -0
  49. data/man/ronin-masscan-import.1.md +57 -0
  50. data/man/ronin-masscan-new.1 +78 -0
  51. data/man/ronin-masscan-new.1.md +70 -0
  52. data/man/ronin-masscan-print.1 +53 -0
  53. data/man/ronin-masscan-print.1.md +56 -0
  54. data/man/ronin-masscan-scan.1 +86 -0
  55. data/man/ronin-masscan-scan.1.md +84 -0
  56. data/man/ronin-masscan.1 +61 -0
  57. data/man/ronin-masscan.1.md +58 -0
  58. data/ronin-masscan.gemspec +62 -0
  59. data/scripts/setup +161 -0
  60. metadata +168 -0
@@ -0,0 +1,116 @@
1
+ .\" Generated by kramdown-man 1.0.1
2
+ .\" https://github.com/postmodern/kramdown-man#readme
3
+ .TH ronin-masscan-dump 1 "2023-03-01" Ronin Masscan "User Manuals"
4
+ .SH NAME
5
+ .PP
6
+ ronin\-masscan\-dump \- Dumps the scanned ports from masscan scan file(s)
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fBronin\-masscan dump\fR \[lB]options\[rB] \fIMASSCAN\[ru]FILE\fP
10
+ .SH DESCRIPTION
11
+ .PP
12
+ Dumps the scanned ports from masscan scan files into a variety of formats\. The
13
+ output formats include:
14
+ .RS
15
+ .IP \(bu 2
16
+ IP
17
+ .IP \(bu 2
18
+ Hostname
19
+ .IP \(bu 2
20
+ \fBIP:PORT\fR
21
+ .IP \(bu 2
22
+ \fBHOST:PORT\fR
23
+ .IP \(bu 2
24
+ URI
25
+ .RE
26
+ .PP
27
+ The command also supports filtering the scanned ports by IP, IP range, domain,
28
+ or port\.
29
+ .SH ARGUMENTS
30
+ .TP
31
+ \fIMASSCAN\[ru]FILE\fP
32
+ The masscan scan file to import\.
33
+ .SH OPTIONS
34
+ .TP
35
+ \fB\-\-print\-ips\fR
36
+ Only print the IP addresses of the targets (ex: \fB192\.168\.1\.1\fR)\.
37
+ .TP
38
+ \fB\-\-print\-hosts\fR
39
+ Only print the hostnames of the targets (ex: \fBexample\.com\fR)\.
40
+ .TP
41
+ \fB\-\-print\-ip\-ports\fR
42
+ Print IP address and port pairs for each target (ex: \fB192\.168\.1\.1:443\fR)\.
43
+ This is the default behavior\.
44
+ .TP
45
+ \fB\-\-print\-host\-ports\fR
46
+ Print hostname and port pairs for each target (ex: \fBexample\.com:443\fR)\.
47
+ .TP
48
+ \`\-\-print\-uris
49
+ Print URIs for each target that has either \fBhttp\fR or \fBhttps\fR services
50
+ (ex: \fBhttps:\[sl]\[sl]example\.com\fR or \fBhttp:\[sl]\[sl]example\.com:8080\fR)\.
51
+ .TP
52
+ \fB\-P\fR, \fB\-\-protocol\fR \fBtcp\fR\[or]\fBudp\fR
53
+ Filters the targets by the protocol of the open port\.
54
+ .TP
55
+ \fB\-\-ip\fR \fIIP\fP
56
+ Filters the targets by a specific IP address\.
57
+ .TP
58
+ \fB\-\-ip\-range\fR \fICIDR\fP
59
+ Filter the targets by a CIDR IP range (ex: \fB192\.168\.1\.0\[sl]24\fR)\.
60
+ .TP
61
+ \fB\-p\fR, \fB\-\-ports\fR \[lC]\fIPORT\fP \[or] \fIPORT1\-PORT2\fP\[rC],\.\.\.
62
+ Filter \fBIP:PORT\fR or \fBHOST:PORT\fR pairs who\[cq]s ports are in the gvien port list\.
63
+ The port list is a comma separated list of port numbers (\fB443\fR) or port
64
+ ranges (\fB8000\-9000\fR)\.
65
+ .TP
66
+ \fB\-h\fR, \fB\-\-help\fR
67
+ Print help information
68
+ .SH EXAMPLES
69
+ .PP
70
+ Print \fBIP:PORT\fR pairs from the masscan scan file:
71
+ .PP
72
+ .RS 4
73
+ .EX
74
+ \[Do] ronin\-masscan dump \-\-print\-ip\-ports masscan\.bin
75
+ .EE
76
+ .RE
77
+ .PP
78
+ Print \fBIP:PORT\fR pairs with ports 22, 80, or 443, from the masscan scan file:
79
+ .PP
80
+ .RS 4
81
+ .EX
82
+ \[Do] ronin\-masscan dump \-\-print\-ip\-ports \-\-ports 22,80,443 masscan\.bin
83
+ .EE
84
+ .RE
85
+ .PP
86
+ Print \fBHOST:PORT\fR pairs from the masscan scan file:
87
+ .PP
88
+ .RS 4
89
+ .EX
90
+ \[Do] ronin\-masscan dump \-\-print\-host\-ports masscan\.bin
91
+ .EE
92
+ .RE
93
+ .PP
94
+ Print target hostnames from the masscan scan file:
95
+ .PP
96
+ .RS 4
97
+ .EX
98
+ \[Do] ronin\-masscan dump \-\-print\-hosts \-\-with\-port 22 masscan\.bin
99
+ .EE
100
+ .RE
101
+ .PP
102
+ Print URIs from the masscan scan file:
103
+ .PP
104
+ .RS 4
105
+ .EX
106
+ \[Do] ronin\-masscan dump \-\-print\-uris masscan\.bin
107
+ .EE
108
+ .RE
109
+ .SH AUTHOR
110
+ .PP
111
+ Postmodern
112
+ .MT postmodern\.mod3\[at]gmail\.com
113
+ .ME
114
+ .SH SEE ALSO
115
+ .PP
116
+ .BR ronin\-masscan\-print (1)
@@ -0,0 +1,94 @@
1
+ # ronin-masscan-dump 1 "2023-03-01" Ronin Masscan "User Manuals"
2
+
3
+ ## NAME
4
+
5
+ ronin-masscan-dump - Dumps the scanned ports from masscan scan file(s)
6
+
7
+ ## SYNOPSIS
8
+
9
+ `ronin-masscan dump` [options] *MASSCAN_FILE*
10
+
11
+ ## DESCRIPTION
12
+
13
+ Dumps the scanned ports from masscan scan files into a variety of formats. The
14
+ output formats include:
15
+
16
+ * IP
17
+ * Hostname
18
+ * `IP:PORT`
19
+ * `HOST:PORT`
20
+ * URI
21
+
22
+ The command also supports filtering the scanned ports by IP, IP range, domain,
23
+ or port.
24
+
25
+ ## ARGUMENTS
26
+
27
+ *MASSCAN_FILE*
28
+ : The masscan scan file to import.
29
+
30
+ ## OPTIONS
31
+
32
+ `--print-ips`
33
+ : Only print the IP addresses of the targets (ex: `192.168.1.1`).
34
+
35
+ `--print-hosts`
36
+ : Only print the hostnames of the targets (ex: `example.com`).
37
+
38
+ `--print-ip-ports`
39
+ : Print IP address and port pairs for each target (ex: `192.168.1.1:443`).
40
+ This is the default behavior.
41
+
42
+ `--print-host-ports`
43
+ : Print hostname and port pairs for each target (ex: `example.com:443`).
44
+
45
+ `--print-uris
46
+ : Print URIs for each target that has either `http` or `https` services
47
+ (ex: `https://example.com` or `http://example.com:8080`).
48
+
49
+ `-P`, `--protocol` `tcp`|`udp`
50
+ : Filters the targets by the protocol of the open port.
51
+
52
+ `--ip` *IP*
53
+ : Filters the targets by a specific IP address.
54
+
55
+ `--ip-range` *CIDR*
56
+ : Filter the targets by a CIDR IP range (ex: `192.168.1.0/24`).
57
+
58
+ `-p`, `--ports` {*PORT* | *PORT1-PORT2*},...
59
+ : Filter `IP:PORT` or `HOST:PORT` pairs who's ports are in the gvien port list.
60
+ The port list is a comma separated list of port numbers (`443`) or port
61
+ ranges (`8000-9000`).
62
+
63
+ `-h`, `--help`
64
+ : Print help information
65
+
66
+ ## EXAMPLES
67
+
68
+ Print `IP:PORT` pairs from the masscan scan file:
69
+
70
+ $ ronin-masscan dump --print-ip-ports masscan.bin
71
+
72
+ Print `IP:PORT` pairs with ports 22, 80, or 443, from the masscan scan file:
73
+
74
+ $ ronin-masscan dump --print-ip-ports --ports 22,80,443 masscan.bin
75
+
76
+ Print `HOST:PORT` pairs from the masscan scan file:
77
+
78
+ $ ronin-masscan dump --print-host-ports masscan.bin
79
+
80
+ Print target hostnames from the masscan scan file:
81
+
82
+ $ ronin-masscan dump --print-hosts --with-port 22 masscan.bin
83
+
84
+ Print URIs from the masscan scan file:
85
+
86
+ $ ronin-masscan dump --print-uris masscan.bin
87
+
88
+ ## AUTHOR
89
+
90
+ Postmodern <postmodern.mod3@gmail.com>
91
+
92
+ ## SEE ALSO
93
+
94
+ [ronin-masscan-print](ronin-masscan-print.1.md)
@@ -0,0 +1,56 @@
1
+ .\" Generated by kramdown-man 1.0.1
2
+ .\" https://github.com/postmodern/kramdown-man#readme
3
+ .TH ronin-masscan-grep 1 "2023-03-01" Ronin Masscan "User Manuals"
4
+ .SH NAME
5
+ .PP
6
+ ronin\-masscan\-grep \- Greps the scanned services from masscan scan file(s)
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fBronin\-masscan grep\fR \[lB]options\[rB] \fIPATTERN\fP \fIMASSCAN\[ru]FILE\fP
10
+ .SH DESCRIPTION
11
+ .PP
12
+ Searches through the scanned services in one or more masscan scan files for the
13
+ given pattern\. The scanned services that contain the text pattern are then
14
+ printed with the text pattern highlighted in red\.
15
+ .PP
16
+ This command specifically searches the \[lq]banner\[rq] records in
17
+ masscan output files generated using the \fBmasscan\fR \fB\-\-banners\fR option\.
18
+ .SH ARGUMENTS
19
+ .TP
20
+ \fIPATTERN\fP
21
+ The pattern to search for\.
22
+ .TP
23
+ \fIMASSCAN\[ru]FILE\fP
24
+ The masscan scan file to import\.
25
+ .SH OPTIONS
26
+ .TP
27
+ \fB\-P\fR, \fB\-\-protocol\fR \fBtcp\fR\[or]\fBudp\fR
28
+ Filters the targets by the protocol of the open port\.
29
+ .TP
30
+ \fB\-\-ip\fR \fIIP\fP
31
+ Filters the targets by a specific IP address\.
32
+ .TP
33
+ \fB\-\-ip\-range\fR \fICIDR\fP
34
+ Filters the targets by a CIDR IP range (ex: \fB192\.168\.1\.0\[sl]24\fR)\.
35
+ .TP
36
+ \fB\-p\fR, \fB\-\-ports\fR \[lC]\fIPORT\fP \[or] \fIPORT1\-PORT2\fP\[rC],\.\.\.
37
+ Filter \fBIP:PORT\fR or \fBHOST:PORT\fR pairs who\[cq]s ports are in the gvien port list\.
38
+ The port list is a comma separated list of port numbers (\fB443\fR) or port
39
+ ranges (\fB8000\-9000\fR)\.
40
+ .TP
41
+ \fB\-\-with\-app\-protocol\fR \fIAPP\[ru]PROTOCOL\fP,\.\.\.
42
+ Filters targets by the app protocol names\.
43
+ .TP
44
+ \fB\-\-with\-payload\fR \fISTRING\fP
45
+ Filters targets by the payload substring\.
46
+ .TP
47
+ \fB\-\-with\-payload\-regex\fR \fB\[sl]\fR\fIREGEX\fP\fB\[sl]\fR
48
+ Filters targets how\[cq]s payload string matches the regular expression\.
49
+ .SH AUTHOR
50
+ .PP
51
+ Postmodern
52
+ .MT postmodern\.mod3\[at]gmail\.com
53
+ .ME
54
+ .SH SEE ALSO
55
+ .PP
56
+ .BR ronin\-masscan\-print (1)
@@ -0,0 +1,59 @@
1
+ # ronin-masscan-grep 1 "2023-03-01" Ronin Masscan "User Manuals"
2
+
3
+ ## NAME
4
+
5
+ ronin-masscan-grep - Greps the scanned services from masscan scan file(s)
6
+
7
+ ## SYNOPSIS
8
+
9
+ `ronin-masscan grep` [options] *PATTERN* *MASSCAN_FILE*
10
+
11
+ ## DESCRIPTION
12
+
13
+ Searches through the scanned services in one or more masscan scan files for the
14
+ given pattern. The scanned services that contain the text pattern are then
15
+ printed with the text pattern highlighted in red.
16
+
17
+ This command specifically searches the "banner" records in
18
+ masscan output files generated using the `masscan` `--banners` option.
19
+
20
+ ## ARGUMENTS
21
+
22
+ *PATTERN*
23
+ : The pattern to search for.
24
+
25
+ *MASSCAN_FILE*
26
+ : The masscan scan file to import.
27
+
28
+ ## OPTIONS
29
+
30
+ `-P`, `--protocol` `tcp`|`udp`
31
+ : Filters the targets by the protocol of the open port.
32
+
33
+ `--ip` *IP*
34
+ : Filters the targets by a specific IP address.
35
+
36
+ `--ip-range` *CIDR*
37
+ : Filters the targets by a CIDR IP range (ex: `192.168.1.0/24`).
38
+
39
+ `-p`, `--ports` {*PORT* | *PORT1-PORT2*},...
40
+ : Filter `IP:PORT` or `HOST:PORT` pairs who's ports are in the gvien port list.
41
+ The port list is a comma separated list of port numbers (`443`) or port
42
+ ranges (`8000-9000`).
43
+
44
+ `--with-app-protocol` *APP_PROTOCOL*,...
45
+ : Filters targets by the app protocol names.
46
+
47
+ `--with-payload` *STRING*
48
+ : Filters targets by the payload substring.
49
+
50
+ `--with-payload-regex` `/`*REGEX*`/`
51
+ : Filters targets how's payload string matches the regular expression.
52
+
53
+ ## AUTHOR
54
+
55
+ Postmodern <postmodern.mod3@gmail.com>
56
+
57
+ ## SEE ALSO
58
+
59
+ [ronin-masscan-print](ronin-masscan-print.1.md)
@@ -0,0 +1,52 @@
1
+ .\" Generated by kramdown-man 1.0.1
2
+ .\" https://github.com/postmodern/kramdown-man#readme
3
+ .TH ronin-masscan-import 1 "2023-03-01" Ronin Masscan "User Manuals"
4
+ .SH NAME
5
+ .PP
6
+ ronin\-masscan\-import \- Imports a masscan scan file into ronin\-db
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fBronin\-masscan import\fR \[lB]\fIoptions\fP\[rB] \fIMASSCAN\[ru]FILE\fP
10
+ .SH DESCRIPTION
11
+ .PP
12
+ Imports the masscan scan file data into the Ronin database\.
13
+ .SH ARGUMENTS
14
+ .TP
15
+ \fIMASSCAN\[ru]FILE\fP
16
+ The masscan scan file to import\.
17
+ .SH OPTIONS
18
+ .TP
19
+ \fB\-\-db\fR \fINAME\fP
20
+ The database name to connect to\. Defaults to \fBdefault\fR if not given\.
21
+ .TP
22
+ \fB\-\-db\-uri\fR \fIURI\fP
23
+ The explicit database URI to connect to
24
+ (ex: \fBpostgres:\[sl]\[sl]user:password\[at]host\[sl]db\fR)\.
25
+ .TP
26
+ \fB\-\-db\-file\fR \fIPATH\fP
27
+ The sqlite3 database file to use\.
28
+ .TP
29
+ \fB\-h\fR, \fB\-\-help\fR
30
+ Print help information
31
+ .SH ENVIRONMENT
32
+ .TP
33
+ \fIHOME\fP
34
+ The user\[cq]s home directory\.
35
+ .TP
36
+ \fIXDG\[ru]CONFIG\[ru]HOME\fP
37
+ Alternate location for the \fB\[ti]\[sl]\.config\fR directory\.
38
+ .TP
39
+ \fIXDG\[ru]DATA\[ru]HOME\fP
40
+ Alternate location for the \fB\[ti]\[sl]\.local\[sl]share\fR directory\.
41
+ .SH FILES
42
+ .TP
43
+ \fB\[ti]\[sl]\.local\[sl]share\[sl]ronin\-db\[sl]database\.sqlite3\fR
44
+ The default sqlite3 database file\.
45
+ .TP
46
+ \fB\[ti]\[sl]\.config\[sl]ronin\-db\[sl]database\.yml\fR
47
+ Optional database configuration\.
48
+ .SH AUTHOR
49
+ .PP
50
+ Postmodern
51
+ .MT postmodern\.mod3\[at]gmail\.com
52
+ .ME
@@ -0,0 +1,57 @@
1
+ # ronin-masscan-import 1 "2023-03-01" Ronin Masscan "User Manuals"
2
+
3
+ ## NAME
4
+
5
+ ronin-masscan-import - Imports a masscan scan file into ronin-db
6
+
7
+ ## SYNOPSIS
8
+
9
+ `ronin-masscan import` [*options*] *MASSCAN_FILE*
10
+
11
+ ## DESCRIPTION
12
+
13
+ Imports the masscan scan file data into the Ronin database.
14
+
15
+ ## ARGUMENTS
16
+
17
+ *MASSCAN_FILE*
18
+ : The masscan scan file to import.
19
+
20
+ ## OPTIONS
21
+
22
+ `--db` *NAME*
23
+ : The database name to connect to. Defaults to `default` if not given.
24
+
25
+ `--db-uri` *URI*
26
+ : The explicit database URI to connect to
27
+ (ex: `postgres://user:password@host/db`).
28
+
29
+ `--db-file` *PATH*
30
+ : The sqlite3 database file to use.
31
+
32
+ `-h`, `--help`
33
+ : Print help information
34
+
35
+ ## ENVIRONMENT
36
+
37
+ *HOME*
38
+ : The user's home directory.
39
+
40
+ *XDG_CONFIG_HOME*
41
+ : Alternate location for the `~/.config` directory.
42
+
43
+ *XDG_DATA_HOME*
44
+ : Alternate location for the `~/.local/share` directory.
45
+
46
+ ## FILES
47
+
48
+ `~/.local/share/ronin-db/database.sqlite3`
49
+ : The default sqlite3 database file.
50
+
51
+ `~/.config/ronin-db/database.yml`
52
+ : Optional database configuration.
53
+
54
+ ## AUTHOR
55
+
56
+ Postmodern <postmodern.mod3@gmail.com>
57
+
@@ -0,0 +1,78 @@
1
+ .\" Generated by kramdown-man 1.0.1
2
+ .\" https://github.com/postmodern/kramdown-man#readme
3
+ .TH ronin-masscan-new 1 "2023-03-01" Ronin Nmap "User Manuals"
4
+ .SH NAME
5
+ .PP
6
+ ronin\-masscan\-new \- Generates a new masscan ruby script
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fBronin\-masscan new\fR \[lB]options\[rB] \fIFILE\fP
10
+ .SH DESCRIPTION
11
+ .PP
12
+ Generates a new masscan scanner or parser Ruby script that uses the
13
+ \fBronin\-masscan\fR library\.
14
+ .SH ARGUMENTS
15
+ .TP
16
+ \fIFILE\fP
17
+ The path to the new Ruby script to generate\.
18
+ .SH OPTIONS
19
+ .TP
20
+ \fB\-\-parser\fR
21
+ Generates a new masscan output file parser Ruby script\.
22
+ .TP
23
+ \fB\-\-scanner\fR
24
+ Generates a new masscan scanner Ruby script\.
25
+ .TP
26
+ \fB\-\-printing\fR
27
+ Adds additional code to the Ruby script that prints the masscan scan data\.
28
+ Is compatible with both \fB\-\-parser\fR and \fB\-\-scanner\fR\.
29
+ .TP
30
+ \fB\-\-import\fR
31
+ Adds additional code to the Ruby script that imports the masscan scan data\.
32
+ Is compatible with both \fB\-\-parser\fR and \fB\-\-scanner\fR\.
33
+ .TP
34
+ \fB\-\-output\-file\fR \fIOUTPUT\[ru]FILE\fP
35
+ Parses or writes the scan results to the given output File\.
36
+ Is compatible with both \fB\-\-parser\fR and \fB\-\-scanner\fR\.
37
+ .TP
38
+ \fB\-p\fR, \fB\-\-port\fR \[lC]\fIPORT\fP \[or] \fIPORT1\fP\-\fIPORT2\fP\[rC],\.\.\.
39
+ Specifies the ports to scan\. Not compatible with the \fB\-\-parser\fR option\.
40
+ .TP
41
+ \fB\-\-ips \fR \[lC]\fIIP\fP \[or] \fIIP\-range\fP\[rC]\[lB],\.\.\.\[rB]
42
+ Adds a target to scan\. May be an IP or a IP CIDR range
43
+ (ex: \fB192\.168\.1\.1\[sl]24\fR)\. The option may be specified more than once\.
44
+ Not compatible with the \fB\-\-parser\fR option\.
45
+ .TP
46
+ \fB\-h\fR, \fB\-\-help\fR
47
+ Print help information
48
+ .SH EXAMPLES
49
+ .PP
50
+ Generates a new masscan scanner Ruby script that scans \fB192\.168\.1\.*\fR, ports 22,
51
+ 80, 443, and 8000 through 9000:
52
+ .PP
53
+ .RS 4
54
+ .EX
55
+ \[Do] ronin\-masscan new scanner\.rb \-\-ips \(aq192\.168\.1\.*\(aq \-\-ports 22,80,443,8000\-9000
56
+ .EE
57
+ .RE
58
+ .PP
59
+ Generates a new masscan output file parser script that parses
60
+ \fBpath\[sl]to\[sl]masscan\.bin\fR and prints the scan information:
61
+ .PP
62
+ .RS 4
63
+ .EX
64
+ \[Do] ronin\-masscan new parser\.rb \-\-parser \-\-output\-file path\[sl]to\[sl]masscan\.bin \-\-printing
65
+ .EE
66
+ .RE
67
+ .SH AUTHOR
68
+ .PP
69
+ Postmodern
70
+ .MT postmodern\.mod3\[at]gmail\.com
71
+ .ME
72
+ .SH SEE ALSO
73
+ .PP
74
+ .BR ronin\-masscan\-scan (1)
75
+ ,
76
+ .BR ronin\-masscan\-print (1)
77
+ ,
78
+ .BR ronin\-masscan\-import (1)
@@ -0,0 +1,70 @@
1
+ # ronin-masscan-new 1 "2023-03-01" Ronin Nmap "User Manuals"
2
+
3
+ ## NAME
4
+
5
+ ronin-masscan-new - Generates a new masscan ruby script
6
+
7
+ ## SYNOPSIS
8
+
9
+ `ronin-masscan new` [options] *FILE*
10
+
11
+ ## DESCRIPTION
12
+
13
+ Generates a new masscan scanner or parser Ruby script that uses the
14
+ `ronin-masscan` library.
15
+
16
+ ## ARGUMENTS
17
+
18
+ *FILE*
19
+ : The path to the new Ruby script to generate.
20
+
21
+ ## OPTIONS
22
+
23
+ `--parser`
24
+ : Generates a new masscan output file parser Ruby script.
25
+
26
+ `--scanner`
27
+ : Generates a new masscan scanner Ruby script.
28
+
29
+ `--printing`
30
+ : Adds additional code to the Ruby script that prints the masscan scan data.
31
+ Is compatible with both `--parser` and `--scanner`.
32
+
33
+ `--import`
34
+ : Adds additional code to the Ruby script that imports the masscan scan data.
35
+ Is compatible with both `--parser` and `--scanner`.
36
+
37
+ `--output-file` *OUTPUT_FILE*
38
+ : Parses or writes the scan results to the given output File.
39
+ Is compatible with both `--parser` and `--scanner`.
40
+
41
+ `-p`, `--port` {*PORT* \| *PORT1*-*PORT2*},...
42
+ : Specifies the ports to scan. Not compatible with the `--parser` option.
43
+
44
+ `--ips ` {*IP* \| *IP-range*}[,...]
45
+ : Adds a target to scan. May be an IP or a IP CIDR range
46
+ (ex: `192.168.1.1/24`). The option may be specified more than once.
47
+ Not compatible with the `--parser` option.
48
+
49
+ `-h`, `--help`
50
+ : Print help information
51
+
52
+ ## EXAMPLES
53
+
54
+ Generates a new masscan scanner Ruby script that scans `192.168.1.*`, ports 22,
55
+ 80, 443, and 8000 through 9000:
56
+
57
+ $ ronin-masscan new scanner.rb --ips '192.168.1.*' --ports 22,80,443,8000-9000
58
+
59
+ Generates a new masscan output file parser script that parses
60
+ `path/to/masscan.bin` and prints the scan information:
61
+
62
+ $ ronin-masscan new parser.rb --parser --output-file path/to/masscan.bin --printing
63
+
64
+ ## AUTHOR
65
+
66
+ Postmodern <postmodern.mod3@gmail.com>
67
+
68
+ ## SEE ALSO
69
+
70
+ [ronin-masscan-scan](ronin-masscan-scan.1.md), [ronin-masscan-print](ronin-masscan-print.1.md), [ronin-masscan-import](ronin-masscan-import.1.md)
@@ -0,0 +1,53 @@
1
+ .\" Generated by kramdown-man 1.0.1
2
+ .\" https://github.com/postmodern/kramdown-man#readme
3
+ .TH ronin-masscan-print 1 "2023-03-01" Ronin Masscan "User Manuals"
4
+ .SH NAME
5
+ .PP
6
+ ronin\-masscan\-print \- Prints the scanned IPs and ports from masscan scan file(s)
7
+ .SH SYNOPSIS
8
+ .PP
9
+ \fBronin\-masscan print\fR \[lB]options\[rB] \fIMASSCAN\[ru]FILE\fP
10
+ .SH DESCRIPTION
11
+ .PP
12
+ Parses one or more masscan scan files and pretty prints the scanned IPs and
13
+ open ports\. The command also supports filtering the scanned ports by IP,
14
+ IP range, domain, or port\.
15
+ .SH ARGUMENTS
16
+ .TP
17
+ \fIMASSCAN\[ru]FILE\fP
18
+ The masscan scan file to import\.
19
+ .SH OPTIONS
20
+ .TP
21
+ \fB\-P\fR, \fB\-\-protocol\fR \fBtcp\fR\[or]\fBudp\fR
22
+ Filters the targets by the protocol of the open port\.
23
+ .TP
24
+ \fB\-\-ip\fR \fIIP\fP
25
+ Filters the targets by a specific IP address\.
26
+ .TP
27
+ \fB\-\-ip\-range\fR \fICIDR\fP
28
+ Filters the targets by a CIDR IP range (ex: \fB192\.168\.1\.0\[sl]24\fR)\.
29
+ .TP
30
+ \fB\-p\fR, \fB\-\-ports\fR \[lC]\fIPORT\fP \[or] \fIPORT1\-PORT2\fP\[rC],\.\.\.
31
+ Filter \fBIP:PORT\fR or \fBHOST:PORT\fR pairs who\[cq]s ports are in the gvien port list\.
32
+ The port list is a comma separated list of port numbers (\fB443\fR) or port
33
+ ranges (\fB8000\-9000\fR)\.
34
+ .TP
35
+ \fB\-\-with\-app\-protocol\fR \fIAPP\[ru]PROTOCOL\fP,\.\.\.
36
+ Filters targets by the app protocol names\.
37
+ .TP
38
+ \fB\-\-with\-payload\fR \fISTRING\fP
39
+ Filters targets by the payload substring\.
40
+ .TP
41
+ \fB\-\-with\-payload\-regex\fR \fB\[sl]\fR\fIREGEX\fP\fB\[sl]\fR
42
+ Filters targets how\[cq]s payload string matches the regular expression\.
43
+ .TP
44
+ \fB\-h\fR, \fB\-\-help\fR
45
+ Print help information
46
+ .SH AUTHOR
47
+ .PP
48
+ Postmodern
49
+ .MT postmodern\.mod3\[at]gmail\.com
50
+ .ME
51
+ .SH SEE ALSO
52
+ .PP
53
+ .BR ronin\-masscan\-dump (1)
@@ -0,0 +1,56 @@
1
+ # ronin-masscan-print 1 "2023-03-01" Ronin Masscan "User Manuals"
2
+
3
+ ## NAME
4
+
5
+ ronin-masscan-print - Prints the scanned IPs and ports from masscan scan file(s)
6
+
7
+ ## SYNOPSIS
8
+
9
+ `ronin-masscan print` [options] *MASSCAN_FILE*
10
+
11
+ ## DESCRIPTION
12
+
13
+ Parses one or more masscan scan files and pretty prints the scanned IPs and
14
+ open ports. The command also supports filtering the scanned ports by IP,
15
+ IP range, domain, or port.
16
+
17
+ ## ARGUMENTS
18
+
19
+ *MASSCAN_FILE*
20
+ : The masscan scan file to import.
21
+
22
+ ## OPTIONS
23
+
24
+ `-P`, `--protocol` `tcp`|`udp`
25
+ : Filters the targets by the protocol of the open port.
26
+
27
+ `--ip` *IP*
28
+ : Filters the targets by a specific IP address.
29
+
30
+ `--ip-range` *CIDR*
31
+ : Filters the targets by a CIDR IP range (ex: `192.168.1.0/24`).
32
+
33
+ `-p`, `--ports` {*PORT* | *PORT1-PORT2*},...
34
+ : Filter `IP:PORT` or `HOST:PORT` pairs who's ports are in the gvien port list.
35
+ The port list is a comma separated list of port numbers (`443`) or port
36
+ ranges (`8000-9000`).
37
+
38
+ `--with-app-protocol` *APP_PROTOCOL*,...
39
+ : Filters targets by the app protocol names.
40
+
41
+ `--with-payload` *STRING*
42
+ : Filters targets by the payload substring.
43
+
44
+ `--with-payload-regex` `/`*REGEX*`/`
45
+ : Filters targets how's payload string matches the regular expression.
46
+
47
+ `-h`, `--help`
48
+ : Print help information
49
+
50
+ ## AUTHOR
51
+
52
+ Postmodern <postmodern.mod3@gmail.com>
53
+
54
+ ## SEE ALSO
55
+
56
+ [ronin-masscan-dump](ronin-masscan-dump.1.md)