pwn 0.4.527 → 0.4.530

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: 97a29eb8082007674ab5011303a4ccb6897e03a99cc01201905e39a6b38e751f
4
- data.tar.gz: d2fe796c9c3761a5d8a3e304946f590974c60bcc4c846cd0e22e727dbf705aff
3
+ metadata.gz: 612f547ef710363dbb2354048dbae80679dc8153f74512d09847f8d43e29e90c
4
+ data.tar.gz: ce2ef03d718183d5130749244cd0237774b3b58003e693b790c59abf21abbe5f
5
5
  SHA512:
6
- metadata.gz: aa2e8b4e875882c5a8a6458aad83def7064e9fd60f40fe7ab25e84a54bbec3595e197e841ab8e89abbb778992281892f7cd2f1b52cc3ab6523f35caa8751ec33
7
- data.tar.gz: 9a620498f22d2c08196e395f4867034e6b13c544ce8d6f7f4bb9d857d1c5ec5339beae2b789a643f2191a829a02821ac7345b10f2115e54ac305d58491b83504
6
+ metadata.gz: 6fd3b7a65884a9551eb6b8cec0b34f1d96dd3211d2d511c144ef31a93ba5ca828327c7c768e42b694765f46af93cfd8b858275c5cf4b9b1065336c430edb1ce7
7
+ data.tar.gz: 0bef199fc9669b712205d3dac1d30e50b24135dd389a28ceccc1a7e193c9fc01fbf33f578665f808d52f22e0d67d55fc72eccda2819b230317eaa7010b7b2f9e
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.527]:001 >>> PWN.help
40
+ pwn[v0.4.530]: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.527]:001 >>> PWN.help
55
+ pwn[v0.4.530]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -4,6 +4,7 @@
4
4
  require 'pwn'
5
5
  require 'optparse'
6
6
  require 'uri'
7
+ require 'cgi'
7
8
  require 'htmlentities'
8
9
 
9
10
  opts = {}
@@ -43,6 +44,9 @@ if opts.empty?
43
44
  end
44
45
 
45
46
  begin
47
+ pwn_provider = ENV.fetch('PWN_PROVIDER') if ENV.fetch('PWN_PROVIDER')
48
+ $stdout.sync = true
49
+
46
50
  target_url = opts[:target_url]
47
51
  parsed_target_url = URI.parse(target_url)
48
52
 
@@ -78,12 +82,11 @@ begin
78
82
 
79
83
  next if wordlist_line.match?(/^#/)
80
84
 
81
- http_uri = "#{target_url}/#{CGI.escape(wordlist_line)}"
82
-
83
85
  http_methods = %i[GET HEAD POST PUT DELETE OPTIONS TRACE]
84
86
  http_methods.each do |http_method|
85
87
  begin
86
88
  print '.'
89
+ http_uri = "#{target_url}/#{wordlist_line}"
87
90
  rest_client_resp_hash = {}
88
91
  rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
89
92
  response = rest_client.execute(
@@ -101,6 +104,7 @@ begin
101
104
  }
102
105
  rescue RestClient::Forbidden,
103
106
  RestClient::BadRequest,
107
+ RestClient::MethodNotAllowed,
104
108
  RestClient::NotFound => e
105
109
 
106
110
  rest_client_resp_hash = {
@@ -111,6 +115,16 @@ begin
111
115
  http_resp: e.response.body[0..300]
112
116
  }
113
117
  next
118
+ rescue URI::InvalidURIError
119
+ url_encoded_wordlist_arr = []
120
+ wordlist_line.split('/').each do |path|
121
+ url_encoded_wordlist_arr.push(CGI.escape(path))
122
+ end
123
+ wordlist_line = url_encoded_wordlist_arr.join('/')
124
+
125
+ retry
126
+ rescue RestClient::TooManyRequests
127
+ sleep 60
114
128
  ensure
115
129
  mutex.synchronize do
116
130
  results_hash[:data].push(rest_client_resp_hash)
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.527'
4
+ VERSION = '0.4.530'
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.527
4
+ version: 0.4.530
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.