pwn 0.5.368 → 0.5.370
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/burp_suite.rb +9 -6
- 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: bbe3ea837ad8701fa7cc40891fd921e1569dea2dedcce3d96132151a470a4bf3
|
4
|
+
data.tar.gz: a87bde8ab4961eba10b1e4786943febd1bcc4cb14bed8f1ed8f250445e3089d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e17221331a7eb7df66fd50eeaf93c18766a1fa952fb656051e9229a187f45eab4fe1bf69ea1e0dfc0e1825e0e4be268a667fa75e1fbe26a5609af6f54b77849
|
7
|
+
data.tar.gz: 34a54b2495245294e3513105c8d6600f76a864369cfd4c436f533554618b11d6087b9cb2b7f086c4b6bc8e0f2941b7f524b824fb1d69ea6503c96f998342eedd
|
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.370]: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.370]: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.370]: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: 30
|
420
420
|
)
|
421
421
|
|
422
422
|
if debug
|
@@ -428,7 +428,8 @@ module PWN
|
|
428
428
|
# Return response body (assumed to be JSON)
|
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.responds_to?(:response) && e.response.respond_to?(:code) && e.response.respond_to?(:body)
|
432
433
|
rescue StandardError => e
|
433
434
|
stop(burp_obj: burp_obj) unless burp_obj.nil?
|
434
435
|
raise e
|
@@ -437,7 +438,7 @@ module PWN
|
|
437
438
|
# Supported Method Parameters:
|
438
439
|
# json_sitemap = PWN::Plugins::BurpSuite.import_openapi_to_sitemap(
|
439
440
|
# burp_obj: 'required - burp_obj returned by #start method',
|
440
|
-
# openapi_spec: 'required - path to OpenAPI JSON specification file',
|
441
|
+
# openapi_spec: 'required - path to OpenAPI JSON or YAML specification file',
|
441
442
|
# additional_http_headers: 'optional - hash of additional HTTP headers to include in requests (default: {})',
|
442
443
|
# highlight: 'optional - highlight color for the sitemap entry (default: "NONE")',
|
443
444
|
# comment: 'optional - comment for the sitemap entry (default: "")',
|
@@ -458,8 +459,10 @@ module PWN
|
|
458
459
|
|
459
460
|
debug = opts[:debug] || false
|
460
461
|
|
461
|
-
# Parse the OpenAPI JSON
|
462
|
-
|
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')
|
463
466
|
|
464
467
|
# Initialize result array
|
465
468
|
sitemap_arr = []
|
@@ -1083,7 +1086,7 @@ module PWN
|
|
1083
1086
|
|
1084
1087
|
json_sitemap = #{self}.import_openapi_to_sitemap(
|
1085
1088
|
burp_obj: 'required - burp_obj returned by #start method',
|
1086
|
-
openapi_spec: 'required - path to OpenAPI JSON specification file',
|
1089
|
+
openapi_spec: 'required - path to OpenAPI JSON or YAML specification file',
|
1087
1090
|
additional_http_headers: 'optional - hash of additional HTTP headers to include in requests (default: {})',
|
1088
1091
|
debug: 'optional - boolean to enable debug logging (default: false)',
|
1089
1092
|
highlight: 'optional - highlight color for the sitemap entry (default: \"NONE\")',
|
data/lib/pwn/version.rb
CHANGED