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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44bbb408cac8fbf89bddf573cfd421a7734074122c67e204a7a7327a019e8bc9
4
- data.tar.gz: 59584e7ccde1340a3154204f362d35dab54e3c028cda2e71d77cfd4ae53410bf
3
+ metadata.gz: 824d4fba48d2116f02f1da02dcfcddf10f04ce2582da1eb4665aace2b17ccae1
4
+ data.tar.gz: 0f8a93703bfde7827a991358d446ac89c8879260ba8423ca03ab11c63ba216cc
5
5
  SHA512:
6
- metadata.gz: 0301766a6c0869bb12b0410210dbb42f2ea93741f9e0bbffd2218ab3375ec690da84b3c696df9f67d15baf372c68099cb18fd5b6e70e306ceb861ea359918d26
7
- data.tar.gz: bf55ba9795765833b0273d157c10ae4883708aa68b969786ba1fd370abc7a3bf216275a7b3b1df4c3aa36b07db069660ad4be781ad23fde89e170c441575e519
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.943]:001 >>> PWN.help
40
+ pwn[v0.4.945]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](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.943]:001 >>> PWN.help
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.943]:001 >>> PWN.help
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
- response = rest_client.execute(
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
- response = rest_client.execute(
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(',').join("\r\n") if opts[:tags]
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(',').join("\r\n") if opts[:tags]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.943'
4
+ VERSION = '0.4.945'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.943
4
+ version: 0.4.945
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.