pwn 0.4.989 → 0.4.990

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: 777085cdccbf8bf547432054c347e5af91a5be1c42b9fd5582cbf582119b5838
4
- data.tar.gz: f2dc8116df0f4719f9a521d1325a1a985bba1ab367ba32c83d1e887aa529e9b5
3
+ metadata.gz: af3ee5fb9ea7c8c0e53013a291f99f22aa3c19b2ff00b72c59acb574d5dfdecd
4
+ data.tar.gz: 341d6d21ef6d1476f909404daf0ec259a430cde3598d22185a62e16ac6248fd8
5
5
  SHA512:
6
- metadata.gz: b258e6f31978ba4c8d2c5ca350253112e9c0cdd99dd370161689b614d9298dc3ced7e2006f6718a1ef59d4e3c8921e6c585a30f8242d2f0f0568fa7f669d3980
7
- data.tar.gz: 81bedcabe4f21448649791b38149a89c2528ee14af8b1192e6c7304acc564b176bb34af1a96e1560419a85b7cb92e6ced002360029c3678e77608e0caabcd227
6
+ metadata.gz: 9468a3b230402f31fb9caec77acca6dcec10646bab6e350d00e680a68c848524e87dce423c5a21abfb6fcf795ad1c832f189dae8ebd6e7162811aa1851f9fcc3
7
+ data.tar.gz: d4359349f2c51cdcfc361de00a069069203cb3c1e53601e311f22e1377039666f1a3dca42ab5267bb7472b4504ebd1294d42611abf1f50af7ce09ae4cd9001cf
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.989]:001 >>> PWN.help
40
+ pwn[v0.4.990]: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.3.0@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.989]:001 >>> PWN.help
55
+ pwn[v0.4.990]: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.3.0@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.4.989]:001 >>> PWN.help
65
+ pwn[v0.4.990]: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:
@@ -60,8 +60,15 @@ module PWN
60
60
 
61
61
  when :post, :put
62
62
  if http_body.is_a?(Hash)
63
- headers[:content_type] = 'multipart/form-data' if http_body.key?(:multipart)
64
- http_body = http_body.to_json unless http_body.key?(:multipart)
63
+ case http_body.key?
64
+ when :multipart
65
+ headers[:content_type] = 'multipart/form-data'
66
+ when :raw
67
+ headers[:content_type] = nil
68
+ http_body = http_body[:file]
69
+ else
70
+ http_body = http_body.to_json unless http_body.key?(:multipart)
71
+ end
65
72
  end
66
73
 
67
74
  response = rest_client.execute(
@@ -178,9 +185,14 @@ module PWN
178
185
  replace: product_id
179
186
  }
180
187
 
188
+ # http_body = {
189
+ # multipart: true,
190
+ # file: File.new(file, 'rb')
191
+ # }
192
+
181
193
  http_body = {
182
- multipart: true,
183
- file: File.new(file, 'rb')
194
+ raw: true,
195
+ file: File.binread(file)
184
196
  }
185
197
 
186
198
  response = bd_bin_analysis_rest_call(
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.989'
4
+ VERSION = '0.4.990'
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.989
4
+ version: 0.4.990
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.