pwn 0.5.336 → 0.5.337
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/bin/pwn_burp_suite_pro_active_scan +7 -0
- data/lib/pwn/plugins/burp_suite.rb +40 -1
- 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: 0df266efa703498ddd6cbb7273a2831110a5816edb7efa86983f11e379ee3d77
|
4
|
+
data.tar.gz: cb492461c9c93d7aae1149863218be38e817b0fb59c1500598e69f3b783ac78b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3629cbc8059bdc38f1e74c003c4499f8bcda4cd9cf96b018ac5948471f0d2ecc5da150af668e5c31e03a609d35d82f5fb954ce58ad7d95997892ee95c39f5ea
|
7
|
+
data.tar.gz: 10ef427857e37163cdb40ef952c106f5f68af16799e017df1955d281d0742213d2fb3cdab3d1fdf38a73f6ce27b0441cd1aad326c88adf7ef5f936dc00c4effc
|
@@ -18,6 +18,10 @@ OptionParser.new do |options|
|
|
18
18
|
opts[:headless] = h
|
19
19
|
end
|
20
20
|
|
21
|
+
options.on('-s', '--[no-]spider', '<Optional - Crawl / Spider Target Prior to Scanning (Defaults to false)>') do |s|
|
22
|
+
opts[:spider] = s
|
23
|
+
end
|
24
|
+
|
21
25
|
options.on('-tTARGET', '--target_url=TARGET', '<Required - Target URI to Scan>') do |t|
|
22
26
|
opts[:target_url] = t
|
23
27
|
end
|
@@ -45,6 +49,7 @@ begin
|
|
45
49
|
|
46
50
|
burp_jar_path = opts[:burp_jar_path]
|
47
51
|
headless = opts[:headless]
|
52
|
+
spider = opts[:spider] || false
|
48
53
|
target_url = opts[:target_url].to_s.scrub
|
49
54
|
output_path = opts[:output_path].to_s.scrub
|
50
55
|
|
@@ -96,6 +101,8 @@ begin
|
|
96
101
|
browser.instance_eval(instruction.to_s.scrub.strip.chomp)
|
97
102
|
end
|
98
103
|
|
104
|
+
PWN::Plugins::BurpSuite.spider(burp_obj: burp_obj, target_url: in_scope) if spider
|
105
|
+
|
99
106
|
duration = 9
|
100
107
|
print "Waiting #{duration} seconds prior to kicking off active scan..."
|
101
108
|
sleep duration # Sleep for now so everything loads the way we expect - blech.
|
@@ -168,6 +168,42 @@ module PWN
|
|
168
168
|
raise e
|
169
169
|
end
|
170
170
|
|
171
|
+
# Supported Method Parameters::
|
172
|
+
# json_in_scope = PWN::Plugins::BurpSuite.spider(
|
173
|
+
# burp_obj: 'required - burp_obj returned by #start method',
|
174
|
+
# target_url: 'required - target url to add to crawl / spider'
|
175
|
+
# )
|
176
|
+
|
177
|
+
public_class_method def self.spider(opts = {})
|
178
|
+
burp_obj = opts[:burp_obj]
|
179
|
+
target_url = opts[:target_url]
|
180
|
+
rest_browser = burp_obj[:rest_browser]
|
181
|
+
pwn_burp_api = burp_obj[:pwn_burp_api]
|
182
|
+
|
183
|
+
post_body = { url: target_url }.to_json
|
184
|
+
|
185
|
+
in_scope = rest_browser.post(
|
186
|
+
"http://#{pwn_burp_api}/spider",
|
187
|
+
post_body, content_type: 'application/json; charset=UTF8'
|
188
|
+
)
|
189
|
+
spider_json = JSON.parse(in_scope, symbolize_names: true)
|
190
|
+
spider_id = spider_json[:id]
|
191
|
+
loop do
|
192
|
+
print '.'
|
193
|
+
spider_status_resp = rest_browser.get("http://#{pwn_burp_api}/spider/#{spider_id}")
|
194
|
+
spider_status_json = JSON.parse(spider_status_resp, symbolize_names: true)
|
195
|
+
spider_status = spider_status_json[:status]
|
196
|
+
break if spider_status == 'finished'
|
197
|
+
|
198
|
+
sleep 3
|
199
|
+
end
|
200
|
+
|
201
|
+
spider_json.merge!(spider_status_json)
|
202
|
+
rescue StandardError => e
|
203
|
+
stop(burp_obj: burp_obj) unless burp_obj.nil?
|
204
|
+
raise e
|
205
|
+
end
|
206
|
+
|
171
207
|
# Supported Method Parameters::
|
172
208
|
# PWN::Plugins::BurpSuite.enable_proxy(
|
173
209
|
# burp_obj: 'required - burp_obj returned by #start method'
|
@@ -638,9 +674,12 @@ module PWN
|
|
638
674
|
rescue RestClient::ExceptionWithResponse => e
|
639
675
|
puts " => #{e.response.code}"
|
640
676
|
next
|
641
|
-
rescue RestClient::ServerBrokeConnection
|
677
|
+
rescue RestClient::ServerBrokeConnection
|
642
678
|
puts ' => Server broke connection.'
|
643
679
|
next
|
680
|
+
rescue Errno::ECONNRESET
|
681
|
+
puts ' => Connection reset by peer.'
|
682
|
+
next
|
644
683
|
end
|
645
684
|
|
646
685
|
# Wait for scan completion
|
data/lib/pwn/version.rb
CHANGED