pwn 0.4.680 → 0.4.681
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_nmap_discover_tcp_udp +21 -11
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 717524d6d611b962be2b71ffb95c427abd3c173347b651904b2a1b1294fd807b
|
4
|
+
data.tar.gz: 894b9128466217e15befedcc67296d47de56e61640eb88c119512994a9db98f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e129b34830468a21f9fa339af587f3c8428cd0328dfa27c8dc5b1e78dc76264dba7398a2341c47f558f072cc36a6024c93ada70564b97fe8b9cbfbd440aa34bc
|
7
|
+
data.tar.gz: 6e9383ba997f1146c6196720e4d2ff0c33b8b982814d37d373eb7888b1a4a21d721e0d35aeb629da10e4c93c497ce7716120220769e131f41eb13415125dc720
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.681]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.4.
|
55
|
+
pwn[v0.4.681]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -15,7 +15,7 @@ OptionParser.new do |options|
|
|
15
15
|
opts[:target_range] = t
|
16
16
|
end
|
17
17
|
|
18
|
-
options.on('-eFILE', '--target-exclude-file=FILE', '<Optional -
|
18
|
+
options.on('-eFILE', '--target-exclude-file=FILE', '<Optional - IP excludes file>') do |e|
|
19
19
|
opts[:exclude_file] = e
|
20
20
|
end
|
21
21
|
|
@@ -23,6 +23,10 @@ OptionParser.new do |options|
|
|
23
23
|
opts[:interface] = i
|
24
24
|
end
|
25
25
|
|
26
|
+
options.on('-rDIR', '--results-root=DIR', '<Optional - nmap results root (Default: /tmp)>') do |r|
|
27
|
+
opts[:results_root] = r
|
28
|
+
end
|
29
|
+
|
26
30
|
options.on('-T', '--tor', '<Optional - Source Scans from Tor Nodes>') do |t|
|
27
31
|
opts[:with_tor] = t
|
28
32
|
end
|
@@ -41,22 +45,28 @@ puts "\n\n\n#{banner}"
|
|
41
45
|
puts "- STARTED: #{started_at} "
|
42
46
|
|
43
47
|
target_range = opts[:target_range]
|
48
|
+
|
49
|
+
results_root = opts[:results_root]
|
50
|
+
results_root ||= '/tmp'
|
51
|
+
FileUtils.mkdir_p results_root
|
52
|
+
puts "Results Saved in: #{results_root}"
|
53
|
+
|
44
54
|
exclude_file = opts[:exclude_file]
|
45
|
-
exclude_file ||=
|
55
|
+
exclude_file ||= "#{results_root}/nmap_targets_exclude.txt"
|
56
|
+
# We create an exclude file (even if its empty)
|
57
|
+
File.new(exclude_file, 'w') unless File.exist?(exclude_file)
|
58
|
+
|
46
59
|
interface = opts[:interface]
|
47
60
|
interface ||= 'eth0'
|
61
|
+
|
48
62
|
with_tor = true if opts[:with_tor]
|
49
63
|
with_tor ||= false
|
64
|
+
|
50
65
|
if with_tor
|
51
66
|
tor_obj = PWN::Plugins::Tor.start
|
52
67
|
proxy = ["socks4://#{tor_obj[:ip]}:#{tor_obj[:port]}"]
|
53
68
|
end
|
54
69
|
|
55
|
-
File.new(exclude_file, 'w') unless File.exist?(exclude_file)
|
56
|
-
nmap_results_root = File.dirname(exclude_file)
|
57
|
-
FileUtils.mkdir_p nmap_results_root
|
58
|
-
puts "nmap Results Saved in: #{nmap_results_root}"
|
59
|
-
|
60
70
|
discovery_tcp_ports = {
|
61
71
|
ftp: 21,
|
62
72
|
ssh: 22,
|
@@ -126,10 +136,10 @@ discovery_sctp_ports = {
|
|
126
136
|
sicc: 38_412
|
127
137
|
}
|
128
138
|
|
129
|
-
target_file = "#{
|
130
|
-
latest_discovery_results = "#{
|
131
|
-
latest_tcp_results = "#{
|
132
|
-
latest_udp_results = "#{
|
139
|
+
target_file = "#{results_root}/nmap_targets.txt"
|
140
|
+
latest_discovery_results = "#{results_root}/nmap_discovery_results.xml"
|
141
|
+
latest_tcp_results = "#{results_root}/nmap_tcp_results"
|
142
|
+
latest_udp_results = "#{results_root}/nmap_udp_results"
|
133
143
|
|
134
144
|
begin
|
135
145
|
# Per man nmap:
|
data/lib/pwn/version.rb
CHANGED