pwn 0.4.786 → 0.4.788

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: a9772a286e2ea5fe916c757b26982bf31f2e1b8445ded71272c6e9556f0af4ff
4
- data.tar.gz: a508f5f6d5871a15f31b84222ba7cb6a359d5e969aae1d10f3e616edd5cb784d
3
+ metadata.gz: 800aa942d00d995458f49f4b8e4c997a2a2087b2a8707eae5f3372ffdbc9dfbd
4
+ data.tar.gz: 52fb2482869d31daf470a3a23385d9b220527eda53f3eb7e5624e462de3d0a44
5
5
  SHA512:
6
- metadata.gz: f4b4e904e687f527586fc441da50a0b19010331fb011a881477c3fe476c92afcd26c32106158c31d71ab59f83d400213e2faf5eb20309e8f15b9c5d2bd15becb
7
- data.tar.gz: d6e86773bfd8ea466b40be042e1b5e9b1422aba221207884be34204b6efbf753ebbb1ea54baeac1d2e94b50a91d19720fd03d7a98fa639b969d0b20b416333a8
6
+ metadata.gz: 4f148b54202627d30a9d53fd8085b0a6a6414d44b88e7fec756a0f45863f5983eb8800845a8eb84f9fc86693fd1dbd2e62329c6092de8ed82c986712fd004158
7
+ data.tar.gz: c1dc31cb2701303af1f009db266797eb5343d1021ae304b0200a0c902acea64b7f92f1a9f9ece1d36a23ce105214864e8b296300e082c6b50a4e09e7cb66e67c
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.786]:001 >>> PWN.help
40
+ pwn[v0.4.788]: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.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.786]:001 >>> PWN.help
55
+ pwn[v0.4.788]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/bin/pwn_bdba_scan CHANGED
@@ -27,6 +27,10 @@ OptionParser.new do |options|
27
27
  opts[:report_path] = r
28
28
  end
29
29
 
30
+ options.on('-R', '--report-only', '<Optional - Only Generate a Black Duck Binary Analysis Scan Report for an Existing Scan (Default: false)>') do |o|
31
+ opts[:report_only] = o
32
+ end
33
+
30
34
  options.on('-tTYPE', '--report-type=TYPE', '<Optional - Black Duck Binary Analysis Scan Report Type csv_libs|csv_vulns|pdf (Default: csv_vulns)>') do |t|
31
35
  opts[:report_type] = t
32
36
  end
@@ -58,6 +62,8 @@ begin
58
62
  report_path = opts[:report_path]
59
63
  raise "ERROR: BDBA Report Path Not Provided: #{report_path}" if report_path.nil?
60
64
 
65
+ report_only = opts[:report_only] ||= false
66
+
61
67
  report_type_str = opts[:report_type] ||= 'csv_vulns'
62
68
  report_type = report_type_str.to_s.to_sym
63
69
 
@@ -71,12 +77,14 @@ begin
71
77
  sorted_parent_arr = parent_arr.sort_by { |g| g[:id] }
72
78
  parent_id = sorted_parent_arr.last[:id]
73
79
 
74
- puts "Uploading/Scanning: #{target_file}"
75
- PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
76
- token: token,
77
- file: target_file,
78
- group_id: parent_id
79
- )
80
+ unless report_only
81
+ puts "Uploading/Scanning: #{target_file}"
82
+ PWN::Plugins::BlackDuckBinaryAnalysis.upload_file(
83
+ token: token,
84
+ file: target_file,
85
+ group_id: parent_id
86
+ )
87
+ end
80
88
 
81
89
  scan_progress_resp = {}
82
90
  loop do
@@ -176,7 +176,7 @@ module PWN
176
176
  response = bd_bin_analysis_rest_call(
177
177
  http_method: :put,
178
178
  token: token,
179
- rest_call: "upload/#{CGI.esccape(file_name)}",
179
+ rest_call: "upload/#{CGI.escape(file_name)}",
180
180
  http_headers: http_headers,
181
181
  http_body: http_body
182
182
  )
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.786'
4
+ VERSION = '0.4.788'
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.786
4
+ version: 0.4.788
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.