pwn 0.4.919 → 0.4.921

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcb633729b67317348c236e6fdedbb0926928203c5b1388a74cd511018de69c4
4
- data.tar.gz: c155211704201141887f37493b1146d6ab8811db5959afdd3680fdc8bfb00485
3
+ metadata.gz: 48f40f1214917bd9a6c846b6e2815645e89a4db4108e907e3302e2924517adaa
4
+ data.tar.gz: c6461897911c1979882723c64ba71c350c9993b81054c87ee647964b3899b1e6
5
5
  SHA512:
6
- metadata.gz: 5533222ce6583175fa2b81dee9fced74d8fec85c5079aa1828cf869c33365361e03d039d0862c1a658e60c6b20587246a41dca1dce53804b801303469bcac98f
7
- data.tar.gz: ed233caf6a1d5c73b6343d655b99336498d11e0f0463ed8bb12386ffb64d166383227451927ecad88af7c745991fad0dab0fc960e12799b974e9f6ebb4843949
6
+ metadata.gz: 1de48f313a153225b9951b4428ce6ccd6d81e7866c6e02d17349c9e20756740e77f83a040025d819739d201c489398a0b463ae14340f0b42d5ee486fd8669909
7
+ data.tar.gz: 846c8f59a9f87096b8c40d9441f24894665f051fec9a7b47eabc32d53a2ae29f768e46517568f486e8417b6cf612134e1b13e72174fa6e94cf90031288f509f7
data/Gemfile CHANGED
@@ -69,7 +69,7 @@ gem 'rmagick', '5.3.0'
69
69
  gem 'rqrcode', '2.2.0'
70
70
  gem 'rspec', '3.12.0'
71
71
  gem 'rtesseract', '3.1.2'
72
- gem 'rubocop', '1.56.3'
72
+ gem 'rubocop', '1.56.4'
73
73
  gem 'rubocop-rake', '0.6.0'
74
74
  gem 'rubocop-rspec', '2.24.1'
75
75
  gem 'ruby-audio', '1.6.1'
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.919]:001 >>> PWN.help
40
+ pwn[v0.4.921]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  If you're using a multi-user install of RVM do:
@@ -48,7 +48,7 @@ $ rvm use ruby-3.2.2@pwn
48
48
  $ rvm list gemsets
49
49
  $ rvmsudo gem install --verbose pwn
50
50
  $ pwn
51
- pwn[v0.4.919]:001 >>> PWN.help
51
+ pwn[v0.4.921]:001 >>> PWN.help
52
52
  ```
53
53
 
54
54
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -63,7 +63,7 @@ $ rvm use ruby-3.2.2@pwn
63
63
  $ gem uninstall --all --executables pwn
64
64
  $ gem install --verbose pwn
65
65
  $ pwn
66
- pwn[v0.4.919]:001 >>> PWN.help
66
+ pwn[v0.4.921]:001 >>> PWN.help
67
67
  ```
68
68
 
69
69
  If you're using a multi-user install of RVM do:
@@ -73,7 +73,7 @@ $ rvm use ruby-3.2.2@pwn
73
73
  $ rvmsudo gem uninstall --all --executables pwn
74
74
  $ rvmsudo gem install --verbose pwn
75
75
  $ pwn
76
- pwn[v0.4.919]:001 >>> PWN.help
76
+ pwn[v0.4.921]:001 >>> PWN.help
77
77
  ```
78
78
 
79
79
 
@@ -77,6 +77,36 @@ module PWN
77
77
  raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
78
78
  end
79
79
  response
80
+ rescue RestClient::ExceptionWithResponse => e
81
+ if e.response
82
+ puts "HTTP RESPONSE CODE: #{e.response.code}"
83
+ puts "HTTP RESPONSE HEADERS:\n#{e.response.headers}"
84
+ puts "HTTP RESPONSE BODY:\n#{e.response.body.inspect}\n\n\n"
85
+ end
86
+
87
+ # Use case statement to evaluate the
88
+ # type of RestClient::ExceptionWithResponse
89
+ # and handle accordingly.
90
+ case e
91
+ when RestClient::Unauthorized
92
+ raise "ERROR: #{e.message} - Invalid token."
93
+ when RestClient::Forbidden
94
+ raise "ERROR: #{e.message} - Insufficient permissions."
95
+ when RestClient::BadRequest
96
+ raise "ERROR: #{e.message} - Invalid request."
97
+ when RestClient::ResourceNotFound
98
+ raise "ERROR: #{e.message} - Resource not found."
99
+ when RestClient::InternalServerError
100
+ raise "ERROR: #{e.message} - Internal server error."
101
+ when RestClient::BadGateway
102
+ raise "ERROR: #{e.message} - Bad gateway."
103
+ when RestClient::ServiceUnavailable
104
+ raise "ERROR: #{e.message} - Service unavailable."
105
+ when RestClient::GatewayTimeout
106
+ raise "ERROR: #{e.message} - Gateway timeout."
107
+ else
108
+ raise e
109
+ end
80
110
  rescue StandardError => e
81
111
  case e.message
82
112
  when '400 Bad Request', '404 Resource Not Found'
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.919'
4
+ VERSION = '0.4.921'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.919
4
+ version: 0.4.921
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-27 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -814,14 +814,14 @@ dependencies:
814
814
  requirements:
815
815
  - - '='
816
816
  - !ruby/object:Gem::Version
817
- version: 1.56.3
817
+ version: 1.56.4
818
818
  type: :runtime
819
819
  prerelease: false
820
820
  version_requirements: !ruby/object:Gem::Requirement
821
821
  requirements:
822
822
  - - '='
823
823
  - !ruby/object:Gem::Version
824
- version: 1.56.3
824
+ version: 1.56.4
825
825
  - !ruby/object:Gem::Dependency
826
826
  name: rubocop-rake
827
827
  requirement: !ruby/object:Gem::Requirement