pwn 0.4.916 → 0.4.918
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 +4 -4
- data/README.md +4 -4
- data/bin/pwn_bdba_scan +11 -6
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fd7436e68d065d6a41044425c6d8003b1da8b57ee4c0353edc3a498ccd5f556
|
|
4
|
+
data.tar.gz: d1788e9755b43f4236d68bde7a6d0066f8ecf3b96970218c368dab45b482f878
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38586ef5ca2e826c128d6b03b1faf4fedf0b6bd6ae5da98d7951f6bba86ce6a34579727aeba224167a291ebf94db6d6f3243395e752ca771ca0509d1c92db081
|
|
7
|
+
data.tar.gz: c638808a8b77409f13740907c3eaa4d58eea8b706c446ec81d4aefeaf504235da2fa0c9136bdfdb5c31f911c5aca5bb051590552ce21906ff4a1b1e2beb0857b
|
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.
|
|
40
|
+
pwn[v0.4.918]: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.
|
|
51
|
+
pwn[v0.4.918]:001 >>> PWN.help
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
[](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.
|
|
66
|
+
pwn[v0.4.918]: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.
|
|
76
|
+
pwn[v0.4.918]:001 >>> PWN.help
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
|
data/bin/pwn_bdba_scan
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
require 'cgi'
|
|
5
5
|
require 'optparse'
|
|
6
6
|
require 'pwn'
|
|
7
|
+
require 'timeout'
|
|
7
8
|
require 'yaml'
|
|
8
9
|
|
|
9
10
|
opts = {}
|
|
@@ -54,7 +55,7 @@ if opts.empty?
|
|
|
54
55
|
exit 1
|
|
55
56
|
end
|
|
56
57
|
|
|
57
|
-
abort_total =
|
|
58
|
+
abort_total = 1
|
|
58
59
|
begin
|
|
59
60
|
pwn_provider = 'ruby-gem'
|
|
60
61
|
pwn_provider = ENV.fetch('PWN_PROVIDER') if ENV.keys.any? { |s| s == 'PWN_PROVIDER' }
|
|
@@ -89,6 +90,7 @@ begin
|
|
|
89
90
|
|
|
90
91
|
unless report_only
|
|
91
92
|
puts "Uploading/Scanning: #{target_file}"
|
|
93
|
+
puts "Scan Attempt #{abort_total} of #{scan_attempts}..."
|
|
92
94
|
PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
|
|
93
95
|
token: token,
|
|
94
96
|
file: target_file,
|
|
@@ -109,9 +111,7 @@ begin
|
|
|
109
111
|
|
|
110
112
|
# Cancel queued scan if it's been queued for more than 90 minutes
|
|
111
113
|
if scan_progress_busy_duration > queue_timeout.to_i
|
|
112
|
-
abort_total += 1
|
|
113
114
|
puts "Scan Queued for More than #{queue_timeout} Seconds."
|
|
114
|
-
puts "Aborting and Re-Queuing Attempt #{abort_total} of #{scan_attempts}..."
|
|
115
115
|
scan_progress_resp[:products].select { |p| p[:status] == 'B' }.each do |p|
|
|
116
116
|
puts "Abort Queued Scan: #{p[:name]}"
|
|
117
117
|
PWN::Plugins::BlackDuckBinaryAnalysis.abort_product_scan(
|
|
@@ -120,9 +120,7 @@ begin
|
|
|
120
120
|
)
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
raise "ERROR: BDBA Scan Aborted: #{target_file}"
|
|
123
|
+
raise Timeout::Error, "ERROR: BDBA Scan Aborted: #{target_file}"
|
|
126
124
|
end
|
|
127
125
|
|
|
128
126
|
10.times do
|
|
@@ -142,6 +140,13 @@ begin
|
|
|
142
140
|
)
|
|
143
141
|
|
|
144
142
|
puts "\nReport Saved to: #{report_path}"
|
|
143
|
+
rescue Timeout::Error
|
|
144
|
+
abort_total += 1
|
|
145
|
+
|
|
146
|
+
retry if abort_total <= scan_attempts.to_i
|
|
147
|
+
|
|
148
|
+
puts 'Scan Attempts Reached - Goodbye.'
|
|
149
|
+
exit 1
|
|
145
150
|
rescue SystemExit, Interrupt
|
|
146
151
|
puts "\nGoodbye."
|
|
147
152
|
rescue StandardError => e
|
data/lib/pwn/version.rb
CHANGED