pwn 0.4.679 → 0.4.680
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 +23 -7
- 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: 6e73bd67263ace8f9f5aa216fe0c0196bbfa25be71769a6ca481e05019c5c0ff
|
4
|
+
data.tar.gz: 3f613847407a0f17ea04cc9ef1e96160cc43377bf31e08345f36a92681615cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3605d4a97ba12d392a9a6b359bbcffd598d83d193ae4f66788b59915017b057c2bbf119ae526318e189cda9a51599e8962e9ee64e15dc0aef429df038896ee4
|
7
|
+
data.tar.gz: c3666977f6a9286b156e0360012c7674e2c1fb68eb988b26305c34d9ba0cef25d2545986f01627da368585028fa4610f3a597a3b9d7511a346227319e1895d0b
|
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.680]: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.680]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -151,7 +151,7 @@ begin
|
|
151
151
|
# Target Discovery Scan
|
152
152
|
# Using -T5 template to reduce number of
|
153
153
|
# retransmission attempts on filtered ports.
|
154
|
-
puts
|
154
|
+
puts banner
|
155
155
|
puts '- PHASE 1: Target Discovery'
|
156
156
|
PWN::Plugins::NmapIt.port_scan do |nmap|
|
157
157
|
if with_tor
|
@@ -188,16 +188,32 @@ begin
|
|
188
188
|
next if File.read(exclude_file).include?(host.ip) ||
|
189
189
|
host.status.state != :up
|
190
190
|
|
191
|
-
|
192
|
-
f.print host.ip
|
193
|
-
f.puts " # { \"hostnames\": #{hosts_arr}}, \"mac\": \"#{host.mac}\" }"
|
191
|
+
f.puts host.ip
|
194
192
|
end
|
195
193
|
end
|
196
194
|
end
|
197
195
|
|
198
|
-
# Produce a good targets.txt redacting duplicates
|
199
|
-
|
200
|
-
|
196
|
+
# Produce a good targets.txt redacting duplicates && sorting by IP
|
197
|
+
sorted_ips = File.readlines(target_file).uniq.map do |ip|
|
198
|
+
IPAddr.new(ip.chomp)
|
199
|
+
end
|
200
|
+
sorted_ips = sorted_ips.sort_by(&:hton)
|
201
|
+
|
202
|
+
# Now Add additional info about the IP as a comment
|
203
|
+
File.open(target_file, 'w') do |f|
|
204
|
+
sorted_ips.each do |ip|
|
205
|
+
PWN::Plugins::NmapIt.parse_xml_results(
|
206
|
+
xml_file: latest_discovery_results
|
207
|
+
) do |xml|
|
208
|
+
xml.each_host do |host|
|
209
|
+
next unless host.ip.to_s == ip.to_s
|
210
|
+
|
211
|
+
hosts_arr = host.hostnames.map { |h| h[:name] }
|
212
|
+
f.puts "#{ip} # { \"hostnames\": #{hosts_arr}}, \"mac\": \"#{host.mac}\" }"
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
201
217
|
|
202
218
|
phase1_ended_at = Time.now.strftime(ftimestr)
|
203
219
|
phase1_ended_at_parse = Time.parse(phase1_ended_at)
|
data/lib/pwn/version.rb
CHANGED