pwn 0.4.918 → 0.4.920

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: 0fd7436e68d065d6a41044425c6d8003b1da8b57ee4c0353edc3a498ccd5f556
4
- data.tar.gz: d1788e9755b43f4236d68bde7a6d0066f8ecf3b96970218c368dab45b482f878
3
+ metadata.gz: d26e9451e72c3b1b96419783e1c380cb2fa9b296c62e9576b014cc4ae5bc3dc4
4
+ data.tar.gz: 6c4d118a24b0bb5650e122a7e685e39117f70412e734ea383a9775610cc3ab04
5
5
  SHA512:
6
- metadata.gz: 38586ef5ca2e826c128d6b03b1faf4fedf0b6bd6ae5da98d7951f6bba86ce6a34579727aeba224167a291ebf94db6d6f3243395e752ca771ca0509d1c92db081
7
- data.tar.gz: c638808a8b77409f13740907c3eaa4d58eea8b706c446ec81d4aefeaf504235da2fa0c9136bdfdb5c31f911c5aca5bb051590552ce21906ff4a1b1e2beb0857b
6
+ metadata.gz: e9301cb2cc8eafbbc75537b567ba2c6712c7872d0fb56ca58292448aac56a599e5cecce447a75801b0aaefd30ff14168485a16f16d8106f91c29b9f912ddb9a6
7
+ data.tar.gz: ed997d70fb09f970ab7740f157944308d8f779c5e53dea928d4e0a9a626953bfd8eb25002f58553880c22072276af147706411085f56ab86c329d788cb830f7a
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.918]:001 >>> PWN.help
40
+ pwn[v0.4.920]: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.918]:001 >>> PWN.help
51
+ pwn[v0.4.920]: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.918]:001 >>> PWN.help
66
+ pwn[v0.4.920]: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.918]:001 >>> PWN.help
76
+ pwn[v0.4.920]:001 >>> PWN.help
77
77
  ```
78
78
 
79
79
 
data/bin/pwn_bdba_scan CHANGED
@@ -90,13 +90,13 @@ begin
90
90
 
91
91
  unless report_only
92
92
  puts "Uploading/Scanning: #{target_file}"
93
- puts "Scan Attempt #{abort_total} of #{scan_attempts}..."
94
93
  PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
95
94
  token: token,
96
95
  file: target_file,
97
96
  group_id: parent_group_id,
98
97
  version: version
99
98
  )
99
+ puts "Scan Attempt #{abort_total} of #{scan_attempts}..."
100
100
  end
101
101
 
102
102
  scan_progress_resp = {}
@@ -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}"
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.918'
4
+ VERSION = '0.4.920'
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.918
4
+ version: 0.4.920
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-09-29 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