pwn 0.4.943 → 0.4.945
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/defect_dojo.rb +18 -25
- 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: 824d4fba48d2116f02f1da02dcfcddf10f04ce2582da1eb4665aace2b17ccae1
|
|
4
|
+
data.tar.gz: 0f8a93703bfde7827a991358d446ac89c8879260ba8423ca03ab11c63ba216cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87972ebd049200357c256315238d525e386c6672d97049bbc7ef5fdacb959522b3a477596e84d8a07bb7f605240597a435b04da65dc97b5dc0e05256730138ee
|
|
7
|
+
data.tar.gz: 4f7386b7181b450f9c7fe070382dca3b03bc9b7961a26c9c70b7a967b875758c96545b518167a41691ae546bc2dfe32104d8f69f8ede8a229ad5b0915ee942b2
|
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.4.
|
|
40
|
+
pwn[v0.4.945]: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.945]: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.2.2@pwn
|
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
|
64
64
|
$ pwn
|
|
65
|
-
pwn[v0.4.
|
|
65
|
+
pwn[v0.4.945]:001 >>> PWN.help
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
|
|
@@ -62,6 +62,7 @@ module PWN
|
|
|
62
62
|
http_body = opts[:http_body]
|
|
63
63
|
|
|
64
64
|
content_type = 'application/json; charset=UTF-8'
|
|
65
|
+
content_type = 'multipart/form-data' if http_body.key?(:multipart)
|
|
65
66
|
|
|
66
67
|
url = dd_obj[:url]
|
|
67
68
|
api_version = dd_obj[:api_version]
|
|
@@ -95,31 +96,23 @@ module PWN
|
|
|
95
96
|
|
|
96
97
|
when :post
|
|
97
98
|
if http_body.key?(:multipart)
|
|
98
|
-
|
|
99
|
-
method: :post,
|
|
100
|
-
url: "#{base_dd_api_uri}/#{rest_call}",
|
|
101
|
-
headers: {
|
|
102
|
-
authorization: dd_obj[:authz_header]
|
|
103
|
-
},
|
|
104
|
-
payload: http_body,
|
|
105
|
-
verify_ssl: false,
|
|
106
|
-
timeout: request_timeout,
|
|
107
|
-
open_timeout: request_timeout
|
|
108
|
-
)
|
|
99
|
+
payload = http_body
|
|
109
100
|
else
|
|
110
|
-
|
|
111
|
-
method: :post,
|
|
112
|
-
url: "#{base_dd_api_uri}/#{rest_call}",
|
|
113
|
-
headers: {
|
|
114
|
-
content_type: content_type,
|
|
115
|
-
authorization: dd_obj[:authz_header]
|
|
116
|
-
},
|
|
117
|
-
payload: http_body.to_json,
|
|
118
|
-
verify_ssl: false,
|
|
119
|
-
timeout: request_timeout,
|
|
120
|
-
open_timeout: request_timeout
|
|
121
|
-
)
|
|
101
|
+
payload = http_body.to_json
|
|
122
102
|
end
|
|
103
|
+
|
|
104
|
+
response = rest_client.execute(
|
|
105
|
+
method: :post,
|
|
106
|
+
url: "#{base_dd_api_uri}/#{rest_call}",
|
|
107
|
+
headers: {
|
|
108
|
+
content_type: content_type,
|
|
109
|
+
authorization: dd_obj[:authz_header]
|
|
110
|
+
},
|
|
111
|
+
payload: payload,
|
|
112
|
+
verify_ssl: false,
|
|
113
|
+
timeout: request_timeout,
|
|
114
|
+
open_timeout: request_timeout
|
|
115
|
+
)
|
|
123
116
|
else
|
|
124
117
|
raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
|
|
125
118
|
end
|
|
@@ -449,7 +442,7 @@ module PWN
|
|
|
449
442
|
http_body[:lead] = user_by_username_object.first[:id]
|
|
450
443
|
end
|
|
451
444
|
|
|
452
|
-
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.delete("\s").split(',')
|
|
445
|
+
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.delete("\s").split(',') if opts[:tags]
|
|
453
446
|
|
|
454
447
|
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
|
|
455
448
|
case minimum_severity
|
|
@@ -555,7 +548,7 @@ module PWN
|
|
|
555
548
|
end
|
|
556
549
|
end
|
|
557
550
|
|
|
558
|
-
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.delete("\s").split(',')
|
|
551
|
+
http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.delete("\s").split(',') if opts[:tags]
|
|
559
552
|
|
|
560
553
|
http_body[:test] = opts[:test_resource_uri] if opts[:test_resource_uri]
|
|
561
554
|
|
data/lib/pwn/version.rb
CHANGED