pwn 0.4.526 → 0.4.529

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: a4983cf7b88510c922dff044a69285eefcc0a54c4ad983c0ea50a65b394eb87a
4
- data.tar.gz: eccb999e2da3f8822969b399a42d6326259fecace34135050724ed4489d9e04e
3
+ metadata.gz: e8edebfc80a2f2a49bb42640d91d3ccb1980a3e54ab4b199a67af322f44f5007
4
+ data.tar.gz: dc73dbe5239f0eed921a39175e2f9d075cb88b569ca6fdc1eb443c58d2f5abc7
5
5
  SHA512:
6
- metadata.gz: a164203055778c7a56d16f69ef43e72e0462355182b8508b7761a82b100be718a5dd040b2997e03d18b277e70ee3f8ccf0990ce815331c6ebece95a6fb200929
7
- data.tar.gz: 96ec62fcf80a95c483d351d92ddae215c46f5742b5377da82077cd418aedf32e05d3eade498fcaae5b82ecbc91d1ed338cf2084f10d708843faa34e3f5270432
6
+ metadata.gz: a82d0cb3201138e6124a84156a8401529fbf9a73fc52bc40a52075da41a1d73aff0bc355e9ae302640d673815751d4eb1987ef923751b1a3106c49151760e07d
7
+ data.tar.gz: 983a1e1654687297cf5d31ee0995aa2bb77490a7820db234f714f8eaaae12c62046e9d4b424c9bada329c9c0c78b918ef92fa2fba5c1398ef9f405f60222365b
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.526]:001 >>> PWN.help
40
+ pwn[v0.4.529]: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.526]:001 >>> PWN.help
55
+ pwn[v0.4.529]: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,13 +82,13 @@ begin
78
82
 
79
83
  next if wordlist_line.match?(/^#/)
80
84
 
81
- http_methods = %i[GET HEAD POST PUT DELETE OPTIONS TRACE]
85
+ http_uri = "#{target_url}/#{CGI.escape(wordlist_line)}"
82
86
 
87
+ http_methods = %i[GET HEAD POST PUT DELETE OPTIONS TRACE]
83
88
  http_methods.each do |http_method|
84
89
  begin
85
90
  print '.'
86
91
  rest_client_resp_hash = {}
87
- http_uri = "#{target_url}/#{wordlist_line}"
88
92
  rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
89
93
  response = rest_client.execute(
90
94
  method: http_method,
@@ -101,6 +105,7 @@ begin
101
105
  }
102
106
  rescue RestClient::Forbidden,
103
107
  RestClient::BadRequest,
108
+ RestClient::MethodNotAllowed,
104
109
  RestClient::NotFound => e
105
110
 
106
111
  rest_client_resp_hash = {
@@ -111,6 +116,8 @@ begin
111
116
  http_resp: e.response.body[0..300]
112
117
  }
113
118
  next
119
+ rescue RestClient::TooManyRequests
120
+ sleep 60
114
121
  ensure
115
122
  mutex.synchronize do
116
123
  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.526'
4
+ VERSION = '0.4.529'
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.526
4
+ version: 0.4.529
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.