pwn 0.4.805 → 0.4.806
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_bdba_groups +13 -35
- 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: f5e7aa0be6bed2f68f8cecb8f8590419f68ba689040f950fc9e8737698764b05
|
4
|
+
data.tar.gz: a272ba7b4ce1d812c13a8d8cf620ddbc8131920a7b4b4aa0c125ed1f639bea3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f668624f4f33f1581fa575e526fab9ebd0ff7fdc3cc0781fb2c0d16b91e8bb60085382daa0bcaaecb5597282eeb455670570d82c8c3805241201772c533665
|
7
|
+
data.tar.gz: ba1d22c8aeb122d0f1d88480941aedea665d723736760093caf2fe56ba66dc44b1a0fa9f07b805a7d38637a2d92e40b38a1e0223a491caa49c3ada949cdc0d7d
|
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.806]: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.
|
55
|
+
pwn[v0.4.806]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_bdba_groups
CHANGED
@@ -23,8 +23,8 @@ OptionParser.new do |options|
|
|
23
23
|
opts[:list_group_name] = l
|
24
24
|
end
|
25
25
|
|
26
|
-
options.on('-
|
27
|
-
opts[:
|
26
|
+
options.on('-pID', '--parent-group-ID=ID', '<Optional - Black Duck Binary Analysis Parent Group ID to Associate with Group>') do |p|
|
27
|
+
opts[:parent_group_id] = p
|
28
28
|
end
|
29
29
|
end.parse!
|
30
30
|
|
@@ -46,54 +46,32 @@ begin
|
|
46
46
|
raise "ERROR: BDBA Token Not Found: #{token}" if token.nil?
|
47
47
|
|
48
48
|
list_group_name = opts[:list_group_name]
|
49
|
-
|
50
|
-
parent_id = nil
|
49
|
+
parent_group_id = opts[:parent_group_id]
|
51
50
|
|
52
|
-
if list_group_name
|
51
|
+
if list_group_name
|
53
52
|
groups_resp = PWN::Plugins::BlackDuckBinaryAnalysis.get_groups(
|
54
53
|
token: token
|
55
54
|
)
|
56
55
|
|
57
|
-
|
58
|
-
|
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
|
-
|
62
|
-
group_arr = groups_resp[:groups].select { |g| g[:name] == list_or_parent }
|
56
|
+
group_arr = groups_resp[:groups].select { |g| g[:name] == list_group_name }
|
63
57
|
|
64
58
|
if list_group_name && group_arr.empty?
|
65
59
|
puts 'BDBA Group Not Found.'
|
66
60
|
exit 1
|
67
61
|
end
|
68
62
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
group_arr_sorted.each do |group|
|
73
|
-
this_group_id = group[:id]
|
74
|
-
this_group_details = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_details(
|
75
|
-
token: token,
|
76
|
-
group_id: this_group_id
|
77
|
-
)
|
78
|
-
dup_groups_arr.push(this_group_details[:group])
|
79
|
-
end
|
80
|
-
|
81
|
-
puts "ERROR: Multiple BDBA Groups Found:\n#{dup_groups_arr}"
|
82
|
-
exit 1
|
83
|
-
end
|
84
|
-
|
85
|
-
group = group_arr_sorted.last
|
86
|
-
parent_id = group[:id]
|
63
|
+
group_details_arr = []
|
64
|
+
group_arr.each do |group|
|
65
|
+
group_id = group.[:id]
|
87
66
|
|
88
|
-
|
89
|
-
group_id = parent_id
|
90
|
-
group_details_resp = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_details(
|
67
|
+
this_group_details = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_details(
|
91
68
|
token: token,
|
92
69
|
group_id: group_id
|
93
70
|
)
|
94
|
-
|
95
|
-
exit 0
|
71
|
+
group_details_arr.push(this_group_details)
|
96
72
|
end
|
73
|
+
puts group_details_arr.to_json
|
74
|
+
exit 0
|
97
75
|
end
|
98
76
|
|
99
77
|
group_name = opts[:group_name]
|
@@ -102,7 +80,7 @@ begin
|
|
102
80
|
create_group_resp = PWN::Plugins::BlackDuckBinaryAnalysis.create_group(
|
103
81
|
token: token,
|
104
82
|
name: group_name,
|
105
|
-
parent_id:
|
83
|
+
parent_id: parent_group_id
|
106
84
|
)
|
107
85
|
|
108
86
|
puts create_group_resp.to_json
|
data/lib/pwn/version.rb
CHANGED