pwn 0.4.534 → 0.4.537

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: 2ee5449e17ec2681731388b5e8140eac6624af6b3abc9d4c3493ddc3ed901b9d
4
- data.tar.gz: 41062a2e6c384693bdb76ef1cfa5d6cb5bdea07a3751716b25d925b0218259a7
3
+ metadata.gz: fb2926e4613475c1d847552947c71b745110f1fce8a23f84574abfc8806c19c6
4
+ data.tar.gz: 3a70c904b8d34243d62df234400861146b45d5e85f7582aff78a3950283eadbe
5
5
  SHA512:
6
- metadata.gz: 29fe90a0ee1a2569e1c225da618ddfff6626f303ac6719c3f1969ee16f7667a576c7a6e3654e017fbd0d445961301a09dfe2f0d5ba591d62f9b3a41922bb23e9
7
- data.tar.gz: 527edf1e00ad62adfdf1672c8cb746357ecc5e331c433e1721921c25a20d8b75ea0c54b4528bf82047dff5d7556385cc76b1301d59722c88be2d126c15aabf79
6
+ metadata.gz: dc4400f19f91713fa283f46d701f03b290428915035bdd2860c3b8f795ac0c2b2d30cb4637628c86ec4c1899c5f742eccc08d76627377c4462bfac5c297d54da
7
+ data.tar.gz: e721f3b395516a7c22859d4461986f9fce3f446f0201bc6604007aeb66197a0a82874c1d506a6710e195c798f46eea3ebf68ad6496f910a63eee710295f428e3
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.534]:001 >>> PWN.help
40
+ pwn[v0.4.537]: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.534]:001 >>> PWN.help
55
+ pwn[v0.4.537]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -25,6 +25,10 @@ OptionParser.new do |options|
25
25
  opts[:http_request_headers] = h
26
26
  end
27
27
 
28
+ options.on('-pPROXY', '--proxy=PROXY', '<Optional - Proxy SCHEME://ADDRESS:PORT>') do |p|
29
+ opts[:proxy] = p
30
+ end
31
+
28
32
  options.on('-tTHREADS', '--max-threads=THREADS', '<Optional # HTTP Requests to Run Simultaneously (Default 100)>') do |t|
29
33
  opts[:max_threads] = t
30
34
  end
@@ -59,6 +63,8 @@ begin
59
63
 
60
64
  http_request_headers = opts[:http_request_headers]
61
65
 
66
+ proxy = opts[:proxy]
67
+
62
68
  max_threads = opts[:max_threads]
63
69
  max_threads ||= 100
64
70
 
@@ -89,13 +95,22 @@ begin
89
95
  next if wordlist_line.match?(/^#/)
90
96
 
91
97
  # http_methods = %i[CONNECT DELETE GET HEAD OPTIONS PATCH POST PUT TRACE]
92
- http_methods = %i[GET HEAD POST PUT DELETE OPTIONS TRACE]
98
+ http_methods = %i[DELETE GET HEAD OPTIONS PATCH POST PUT TRACE]
93
99
  http_methods.each do |http_method|
94
100
  begin
95
101
  print '.'
96
102
  http_uri = "#{target_url}/#{wordlist_line}"
97
103
  rest_client_resp_hash = {}
98
- rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
104
+ if proxy
105
+ rest_client = PWN::Plugins::TransparentBrowser.open(
106
+ browser_type: :rest,
107
+ proxy: proxy
108
+ )::Request
109
+ else
110
+ rest_client = PWN::Plugins::TransparentBrowser.open(
111
+ browser_type: :rest
112
+ )::Request
113
+ end
99
114
 
100
115
  headers = nil
101
116
  if http_request_headers
@@ -119,14 +134,7 @@ begin
119
134
  http_resp_code: response.code,
120
135
  http_resp: response.body[0..300]
121
136
  }
122
- rescue RestClient::BadRequest,
123
- RestClient::Forbidden,
124
- RestClient::GatewayTimeout,
125
- RestClient::InternalServerError,
126
- RestClient::MethodNotAllowed,
127
- RestClient::NotFound,
128
- RestClient::ServiceUnavailable => e
129
-
137
+ rescue RestClient::ExceptionWithResponse => e
130
138
  rest_client_resp_hash = {
131
139
  request_timestamp: Time.now.strftime('%Y-%m-%d_%H-%M-%S'),
132
140
  http_uri: http_uri,
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.534'
4
+ VERSION = '0.4.537'
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.534
4
+ version: 0.4.537
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.