pwn 0.5.153 → 0.5.154
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 +3 -3
- data/lib/pwn/plugins/ip_info.rb +13 -3
- 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: cdc176de7f592b5c19650942854e4efa7d0158c835e89ace9f40af31a5a92f90
|
4
|
+
data.tar.gz: 3f756b2f5deb2589c2e9d30068d13b1e460b0e7091cdeae6a0097fa3947e98ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a6437ab3cb220bd0c374b9672848646bace31fd6ba283e717a67db97a7826a397a9e8a68d0339f209cffebb55d8e63c918ebd211335b9406961822b2136c715
|
7
|
+
data.tar.gz: 7ece6c1aeb18b7a16d772552717708c0df8b30483547e4080f2f2699173e52b1207b2a2b55ab3856cd077a958e065e89f32bf274d58894799db53b55db6a1939
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.154]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.1@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.154]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.1@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.154]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/lib/pwn/plugins/ip_info.rb
CHANGED
@@ -149,6 +149,8 @@ module PWN
|
|
149
149
|
timestamp = Time.now.strftime('%Y-%m-%d_%H.%M.%S')
|
150
150
|
results_file = opts[:results_file] ||= "/tmp/SUBS.#{parent_domain}-#{timestamp}-pwn_bruteforce_subdomains.txt"
|
151
151
|
|
152
|
+
File.write(results_file, '[')
|
153
|
+
|
152
154
|
# Break up dictonary file into sublines and process each subline in a thread
|
153
155
|
dict_lines = File.readlines(dictionary).shuffle
|
154
156
|
mutex = Mutex.new
|
@@ -157,8 +159,7 @@ module PWN
|
|
157
159
|
max_threads: max_threads
|
158
160
|
) do |subline|
|
159
161
|
subdomain = subline.to_s.scrub.strip.chomp
|
160
|
-
|
161
|
-
|
162
|
+
target = parent_domain if subdomain.empty?
|
162
163
|
target = "#{subdomain}.#{parent_domain}"
|
163
164
|
ip_info_resp = get(
|
164
165
|
target: target,
|
@@ -171,12 +172,21 @@ module PWN
|
|
171
172
|
|
172
173
|
mutex.synchronize do
|
173
174
|
File.open(results_file, 'a') do |file|
|
174
|
-
|
175
|
+
resp_len = ip_info_resp.length
|
176
|
+
next unless resp_len.positive?
|
177
|
+
|
178
|
+
ip_info_resp.each do |ip_info_hash|
|
179
|
+
file.puts "#{JSON.generate(ip_info_hash)},"
|
180
|
+
end
|
175
181
|
end
|
176
182
|
end
|
177
183
|
end
|
178
184
|
rescue StandardError => e
|
179
185
|
raise e
|
186
|
+
ensure
|
187
|
+
# Strip trailing comma and close JSON array
|
188
|
+
File.readlines(results_file)[-1].chomp!(',')
|
189
|
+
File.append(results_file, ']')
|
180
190
|
end
|
181
191
|
|
182
192
|
# Author(s):: 0day Inc. <support@0dayinc.com>
|
data/lib/pwn/version.rb
CHANGED