Skip to content

Commit fd8c646

Browse files
authored
Merge pull request #339 from ninp0/master
pwn_bdba_groups Driver - #debug
2 parents 92c9c69 + 25daa98 commit fd8c646

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
3737
$ rvm list gemsets
3838
$ gem install --verbose pwn
3939
$ pwn
40-
pwn[v0.4.772]:001 >>> PWN.help
40+
pwn[v0.4.773]:001 >>> PWN.help
4141
```
4242

4343
[![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
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.772]:001 >>> PWN.help
55+
pwn[v0.4.773]:001 >>> PWN.help
5656
```
5757

5858

bin/pwn_bdba_groups

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ begin
4545
token = yaml_config[:token]
4646
raise "ERROR: BDBA Token Not Found: #{token}" if token.nil?
4747

48-
group_name = opts[:group_name]
49-
raise "ERROR: BDBA Group Name Not Provided: #{group_name}" if group_name.nil?
50-
5148
list_group_name = opts[:list_group_name]
5249
parent_group_name = opts[:parent_group_name]
5350
parent_id = nil
@@ -59,7 +56,9 @@ begin
5956

6057
raise 'No groups found in BDBA. Use the --create flag to create your first group.' if groups_resp.nil?
6158

62-
list_or_parent = list_group_name ||= parent_group_name
59+
list_or_parent = list_group_name unless list_group_name.nil?
60+
list_or_parent = parent_group_name unless parent_group_name.nil?
61+
6362
group_arr = groups_resp[:groups].select { |g| g[:name] == list_or_parent }
6463
group_arr_sorted = group_arr.sort_by { |g| g[:id] }
6564
group = group_arr_sorted.last
@@ -83,6 +82,9 @@ begin
8382
end
8483
end
8584

85+
group_name = opts[:group_name]
86+
raise "ERROR: BDBA Group Name Not Provided: #{group_name}" if group_name.nil?
87+
8688
PWN::Plugins::BlackDuckBinaryAnalysis.create_group(
8789
token: token,
8890
name: group_name,

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.4.772'
4+
VERSION = '0.4.773'
55
end

0 commit comments

Comments
 (0)