pwn 0.4.530 → 0.4.531

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: 612f547ef710363dbb2354048dbae80679dc8153f74512d09847f8d43e29e90c
4
- data.tar.gz: ce2ef03d718183d5130749244cd0237774b3b58003e693b790c59abf21abbe5f
3
+ metadata.gz: 6394ac8b510c9c427d2fc3b33ee841f1704fa48396b2b7c36f363cbb5b7b49cc
4
+ data.tar.gz: 8881fadfee9f8a141a2d88ff6cb7b3dc634248aa30286237d8df90556c38d32f
5
5
  SHA512:
6
- metadata.gz: 6fd3b7a65884a9551eb6b8cec0b34f1d96dd3211d2d511c144ef31a93ba5ca828327c7c768e42b694765f46af93cfd8b858275c5cf4b9b1065336c430edb1ce7
7
- data.tar.gz: 0bef199fc9669b712205d3dac1d30e50b24135dd389a28ceccc1a7e193c9fc01fbf33f578665f808d52f22e0d67d55fc72eccda2819b230317eaa7010b7b2f9e
6
+ metadata.gz: 0d6a8a9d848e2a0997f1c66c79a8ff5384105ca366ee52870bad930926135307da9aa0668a579a63c407fa2c65fa375545a20cdd7abf659eb1ce3f5c65283cc4
7
+ data.tar.gz: ec79695ebc8ad252ca484658683bb522f70d621c5354ac88971369bd395044d7d336670b26aea4b8a30678bdcdd43f04afcee1e498bd94213856bc04276972e3
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.530]:001 >>> PWN.help
40
+ pwn[v0.4.531]: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.1.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.530]:001 >>> PWN.help
55
+ pwn[v0.4.531]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -21,6 +21,10 @@ OptionParser.new do |options|
21
21
  opts[:wordlist] = w
22
22
  end
23
23
 
24
+ options.on('-rHEADERS', '--request-headers=HEADERS', '<Optional - HTTP Request Headers in JSON Format)>') do |h|
25
+ opts[:http_request_headers] = h
26
+ end
27
+
24
28
  options.on('-tTHREADS', '--max-threads=THREADS', '<Optional # HTTP Requests to Run Simultaneously (Default 100)>') do |t|
25
29
  opts[:max_threads] = t
26
30
  end
@@ -53,6 +57,8 @@ begin
53
57
  wordlist = opts[:wordlist]
54
58
  raise "ERROR: #{wordlist} Does Not Exist." unless File.exist?(wordlist)
55
59
 
60
+ http_request_headers = opts[:http_request_headers]
61
+
56
62
  max_threads = opts[:max_threads]
57
63
  max_threads ||= 100
58
64
 
@@ -89,9 +95,19 @@ begin
89
95
  http_uri = "#{target_url}/#{wordlist_line}"
90
96
  rest_client_resp_hash = {}
91
97
  rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
98
+
99
+ headers = nil
100
+ if http_request_headers
101
+ headers = JSON.parse(
102
+ http_request_headers,
103
+ symbolize_names: true
104
+ )
105
+ end
106
+
92
107
  response = rest_client.execute(
93
108
  method: http_method,
94
109
  url: http_uri,
110
+ headers: headers,
95
111
  verify_ssl: false
96
112
  )
97
113
 
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.530'
4
+ VERSION = '0.4.531'
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.530
4
+ version: 0.4.531
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.