pwn 0.5.369 → 0.5.371
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/.rubocop.yml +1 -1
- data/README.md +3 -3
- data/lib/pwn/plugins/burp_suite.rb +13 -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: 1df5b3d4c2d79901fe666b5577650d27f0d76352869d63e7663d20ac7abf77f0
|
4
|
+
data.tar.gz: 0a43e230337f5c7c4d767e25bd37b308c1f0b58f35d1594c5cf83bef51bd2db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cc49d2a3342cdf77836653582c71b7d3925e9b04924751ee6ba158726a4567ef29377bf51070e2e3b9aa393bfa24f30f448f848c89412d8a48bd3340f18b40b
|
7
|
+
data.tar.gz: cbbc66c2dc8a5d0f323765f60d1fc01217e4d75b9aea514b51265cb7d699b30f38cffef2cf8c2c376760f0dcca8db7cf5ee485e324333af011643d5be9e3eee4
|
data/.rubocop.yml
CHANGED
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.371]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@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.371]: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.4.4@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.371]: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:
|
@@ -416,7 +416,7 @@ module PWN
|
|
416
416
|
url: "http://#{pwn_burp_api}/sitemap",
|
417
417
|
payload: sitemap.to_json,
|
418
418
|
headers: { content_type: 'application/json; charset=UTF-8' },
|
419
|
-
timeout:
|
419
|
+
timeout: 10
|
420
420
|
)
|
421
421
|
|
422
422
|
if debug
|
@@ -429,7 +429,7 @@ module PWN
|
|
429
429
|
JSON.parse(response.body, symbolize_names: true)
|
430
430
|
rescue RestClient::ExceptionWithResponse => e
|
431
431
|
puts "ERROR: Failed to add to sitemap: #{e.message}"
|
432
|
-
puts "HTTP error adding to sitemap: Status #{e.response.code}, Response: #{e.response.body}" if e.
|
432
|
+
puts "HTTP error adding to sitemap: Status #{e.response.code}, Response: #{e.response.body}" if e.respond_to?(:response) && e.response.respond_to?(:code) && e.response.respond_to?(:body)
|
433
433
|
rescue StandardError => e
|
434
434
|
stop(burp_obj: burp_obj) unless burp_obj.nil?
|
435
435
|
raise e
|
@@ -438,7 +438,7 @@ module PWN
|
|
438
438
|
# Supported Method Parameters:
|
439
439
|
# json_sitemap = PWN::Plugins::BurpSuite.import_openapi_to_sitemap(
|
440
440
|
# burp_obj: 'required - burp_obj returned by #start method',
|
441
|
-
# openapi_spec: 'required - path to OpenAPI JSON specification file',
|
441
|
+
# openapi_spec: 'required - path to OpenAPI JSON or YAML specification file',
|
442
442
|
# additional_http_headers: 'optional - hash of additional HTTP headers to include in requests (default: {})',
|
443
443
|
# highlight: 'optional - highlight color for the sitemap entry (default: "NONE")',
|
444
444
|
# comment: 'optional - comment for the sitemap entry (default: "")',
|
@@ -459,8 +459,10 @@ module PWN
|
|
459
459
|
|
460
460
|
debug = opts[:debug] || false
|
461
461
|
|
462
|
-
# Parse the OpenAPI JSON
|
463
|
-
|
462
|
+
# Parse the OpenAPI JSON or YAML specification file
|
463
|
+
# If the opeenapi_spec is YAML, convert it to JSON
|
464
|
+
openapi = JSON.parse(File.read(openapi_spec), symbolize_names: true) if openapi_spec.end_with?('.json')
|
465
|
+
openapi = YAML.safe_load_file(openapi_spec, permitted_classes: [Symbol, Date, Time], aliases: true, symbolize_names: true) if openapi_spec.end_with?('.yaml', '.yml')
|
464
466
|
|
465
467
|
# Initialize result array
|
466
468
|
sitemap_arr = []
|
@@ -763,7 +765,11 @@ module PWN
|
|
763
765
|
end
|
764
766
|
end
|
765
767
|
|
766
|
-
|
768
|
+
begin
|
769
|
+
sitemap_arr.each { |sitemap| add_to_sitemap(burp_obj: burp_obj, sitemap: sitemap) }
|
770
|
+
rescue RestClient::ExceptionWithResponse
|
771
|
+
next
|
772
|
+
end
|
767
773
|
|
768
774
|
sitemap_arr
|
769
775
|
rescue StandardError => e
|
@@ -1084,7 +1090,7 @@ module PWN
|
|
1084
1090
|
|
1085
1091
|
json_sitemap = #{self}.import_openapi_to_sitemap(
|
1086
1092
|
burp_obj: 'required - burp_obj returned by #start method',
|
1087
|
-
openapi_spec: 'required - path to OpenAPI JSON specification file',
|
1093
|
+
openapi_spec: 'required - path to OpenAPI JSON or YAML specification file',
|
1088
1094
|
additional_http_headers: 'optional - hash of additional HTTP headers to include in requests (default: {})',
|
1089
1095
|
debug: 'optional - boolean to enable debug logging (default: false)',
|
1090
1096
|
highlight: 'optional - highlight color for the sitemap entry (default: \"NONE\")',
|
data/lib/pwn/version.rb
CHANGED