pwn 0.4.733 → 0.4.735

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6440be0b7c0dc86b8551df9a4b9cb2b5779924b77ffc3d6687a4872c9703b4e8
4
- data.tar.gz: 5a16d32ada65b0bb631f0238c17760f25543db8a7082d2382054bfe37009a063
3
+ metadata.gz: 91ea0aaa9a3d3f2f0e7e6a38c58a4199bd770cf7784486cc59e99e4add3ec9c3
4
+ data.tar.gz: c047b603b26553c23b13ac4e4c856a11556908f1020d3d6bd5b4160d380a0b9d
5
5
  SHA512:
6
- metadata.gz: 46e43c9b96e9a2d71fa1ec70fca237c71c6b1defae51d714a39b9f35603f822ac8eff72a604f2da2c84dabcd6722c2c8f683690acf89307587609550034c04ce
7
- data.tar.gz: 7e88c613bfc17b98d37d54e8b6722751a88d4b377f73eb2f300d26374d61dc91f99522c8a0e7c686ab9cba474d68cb8286c982fdc1ac355482efc33fb81e6511
6
+ metadata.gz: 45e128055e6a8bf97a62d2c9dae4cfe44589648ed297d677df52142bec308c83f0416a8ce19f500ab20113955a666bee8ebf56408770e3e83f6746f2f27654e6
7
+ data.tar.gz: 11cdcd0233d414543d90e85b6c78d51b9af6e1de24b6b1e8f95ba66d251d3d1448d66f3330f0f622b991b655625002e52c29491b6c26c33b7e25d5a4fab3dd3f
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.733]:001 >>> PWN.help
40
+ pwn[v0.4.735]: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.733]:001 >>> PWN.help
55
+ pwn[v0.4.735]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -29,8 +29,14 @@ module PWN
29
29
  end
30
30
  rest_call = opts[:rest_call].to_s.scrub
31
31
  params = opts[:params]
32
+
33
+ headers = opts[:http_headers]
34
+ headers ||= {
35
+ content_type: content_type,
36
+ authorization: "Bearer #{token}"
37
+ }
38
+
32
39
  http_body = opts[:http_body]
33
- http_body ||= {}
34
40
  base_bd_bin_analysis_api_uri = 'https://protecode-sc.com/api'
35
41
  token = opts[:token]
36
42
 
@@ -44,12 +50,7 @@ module PWN
44
50
 
45
51
  case http_method
46
52
  when :delete, :get
47
- headers = opts[:http_headers]
48
- headers ||= {
49
- content_type: content_type,
50
- authorization: "Bearer #{token}",
51
- params: params
52
- }
53
+ headers[:params] = params
53
54
  response = rest_client.execute(
54
55
  method: http_method,
55
56
  url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
@@ -58,11 +59,6 @@ module PWN
58
59
  )
59
60
 
60
61
  when :post, :put
61
- headers = opts[:http_headers]
62
- # if http_body.key?(:multipart)
63
- headers ||= {
64
- authorization: "Bearer #{token}"
65
- }
66
62
  response = rest_client.execute(
67
63
  method: :post,
68
64
  url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
@@ -70,19 +66,6 @@ module PWN
70
66
  payload: http_body,
71
67
  verify_ssl: false
72
68
  )
73
- # else
74
- # headers ||= {
75
- # content_type: content_type,
76
- # authorization: "Bearer #{token}"
77
- # }
78
- # response = rest_client.execute(
79
- # method: http_method,
80
- # url: "#{base_bd_bin_analysis_api_uri}/#{rest_call}",
81
- # headers: headers,
82
- # payload: http_body.to_json,
83
- # verify_ssl: false
84
- # )
85
- # end
86
69
  else
87
70
  raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
88
71
  end
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.733'
4
+ VERSION = '0.4.735'
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.733
4
+ version: 0.4.735
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.