pwn 0.5.42 → 0.5.44
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/.rubocop.yml +22 -3
- data/.rubocop_todo.yml +60 -41
- data/Gemfile +5 -4
- data/README.md +3 -3
- data/bin/pwn +18 -6
- data/lib/pwn/plugins/assembly.rb +60 -0
- data/lib/pwn/plugins/black_duck_binary_analysis.rb +51 -0
- data/lib/pwn/version.rb +1 -1
- data/packer/provisioners/aliases.rb +1 -0
- data/pwn.gemspec +3 -1
- metadata +24 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f25e99b7bab77b60bf540f3a7116b5a73880b4a48bb657fab50d3b790fa1c55
|
|
4
|
+
data.tar.gz: 1b1f20af44bedd09315acfe8f0d7e96cb80c51709a38daf7686f806de07694a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5a537100ad7b89d3f50fff3378a6d278cfd306fafcb28a25bdfef94c3284865b80936fa70010e67851a98f1b113466606c59175ddefaee25273492cdad16616
|
|
7
|
+
data.tar.gz: 8e686718096043e4b91a9f82a31ea5d584a7a80f9e7f07c7293c6a455910d06aad5e06b091b9111115e1f38f4bfae7031c8bfdab0c46c710afcc97773a42477c
|
data/.rubocop.yml
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
|
2
1
|
AllCops:
|
|
3
2
|
UseCache: false
|
|
4
3
|
NewCops: enable
|
|
5
|
-
Layout:
|
|
6
|
-
Max:
|
|
4
|
+
Layout/LineLength:
|
|
5
|
+
Max: 293
|
|
6
|
+
Lint/UselessRescue:
|
|
7
|
+
Enabled: false
|
|
8
|
+
Metrics/AbcSize:
|
|
9
|
+
Max: 537.6
|
|
10
|
+
Metrics/BlockLength:
|
|
11
|
+
Max: 138
|
|
12
|
+
Metrics/BlockNesting:
|
|
13
|
+
Max: 4
|
|
14
|
+
Metrics/ClassLength:
|
|
15
|
+
Max: 134
|
|
16
|
+
Metrics/CyclomaticComplexity:
|
|
17
|
+
Max: 103
|
|
18
|
+
Metrics/MethodLength:
|
|
19
|
+
Max: 485
|
|
20
|
+
Metrics/ModuleLength:
|
|
21
|
+
Max: 495
|
|
22
|
+
Metrics/PerceivedComplexity:
|
|
23
|
+
Max: 101
|
|
7
24
|
Style/HashEachMethods:
|
|
8
25
|
Enabled: true
|
|
9
26
|
Style/HashSyntax:
|
|
@@ -14,3 +31,5 @@ Style/HashTransformValues:
|
|
|
14
31
|
Enabled: true
|
|
15
32
|
Style/RedundantLineContinuation:
|
|
16
33
|
Enabled: false
|
|
34
|
+
|
|
35
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2024-
|
|
3
|
+
# on 2024-03-04 01:40:30 UTC using RuboCop version 1.61.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Configuration parameters: Severity, Include.
|
|
11
|
+
# Include: **/*.gemspec
|
|
12
|
+
Gemspec/RequiredRubyVersion:
|
|
13
|
+
Exclude:
|
|
14
|
+
- 'pwn.gemspec'
|
|
15
|
+
|
|
9
16
|
# Offense count: 5
|
|
10
17
|
# This cop supports safe autocorrection (--autocorrect).
|
|
11
18
|
# Configuration parameters: EnforcedStyle.
|
|
@@ -17,30 +24,43 @@ Layout/LineContinuationSpacing:
|
|
|
17
24
|
- 'packer/provisioners/wpscan.rb'
|
|
18
25
|
- 'vagrant/provisioners/beef.rb'
|
|
19
26
|
|
|
20
|
-
# Offense count:
|
|
27
|
+
# Offense count: 18
|
|
28
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
29
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
30
|
+
# URISchemes: http, https
|
|
31
|
+
Layout/LineLength:
|
|
32
|
+
Exclude:
|
|
33
|
+
- 'Vagrantfile'
|
|
34
|
+
- 'bin/pwn_diff_csv_files_w_column_exclude'
|
|
35
|
+
- 'lib/pwn/banner/jmp_esp.rb'
|
|
36
|
+
- 'lib/pwn/plugins/mail_agent.rb'
|
|
37
|
+
- 'lib/pwn/plugins/open_ai.rb'
|
|
38
|
+
- 'lib/pwn/reports/fuzz.rb'
|
|
39
|
+
- 'lib/pwn/reports/phone.rb'
|
|
40
|
+
- 'lib/pwn/reports/sast.rb'
|
|
41
|
+
- 'lib/pwn/reports/uri_buster.rb'
|
|
42
|
+
- 'lib/pwn/sast/banned_function_calls_c.rb'
|
|
43
|
+
|
|
44
|
+
# Offense count: 294
|
|
21
45
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
46
|
+
# Configuration parameters: AutoCorrect.
|
|
22
47
|
Lint/UselessAssignment:
|
|
23
48
|
Enabled: false
|
|
24
49
|
|
|
25
|
-
# Offense count:
|
|
26
|
-
|
|
27
|
-
Enabled: false
|
|
28
|
-
|
|
29
|
-
# Offense count: 291
|
|
30
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
31
|
-
Metrics/AbcSize:
|
|
32
|
-
Max: 328
|
|
33
|
-
|
|
34
|
-
# Offense count: 71
|
|
35
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
50
|
+
# Offense count: 3
|
|
51
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
36
52
|
# AllowedMethods: refine
|
|
37
53
|
Metrics/BlockLength:
|
|
38
|
-
|
|
54
|
+
Exclude:
|
|
55
|
+
- '**/*.gemspec'
|
|
56
|
+
- 'lib/pwn/plugins/android.rb'
|
|
57
|
+
- 'lib/pwn/plugins/msr206.rb'
|
|
58
|
+
- 'lib/pwn/sast/banned_function_calls_c.rb'
|
|
39
59
|
|
|
40
|
-
# Offense count:
|
|
41
|
-
# Configuration parameters: CountBlocks.
|
|
60
|
+
# Offense count: 44
|
|
61
|
+
# Configuration parameters: CountBlocks, Max.
|
|
42
62
|
Metrics/BlockNesting:
|
|
43
|
-
|
|
63
|
+
Enabled: false
|
|
44
64
|
|
|
45
65
|
# Offense count: 1
|
|
46
66
|
# Configuration parameters: LengthThreshold.
|
|
@@ -48,31 +68,36 @@ Metrics/CollectionLiteralLength:
|
|
|
48
68
|
Exclude:
|
|
49
69
|
- 'lib/pwn/plugins/uri_scheme.rb'
|
|
50
70
|
|
|
51
|
-
# Offense count:
|
|
52
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
71
|
+
# Offense count: 1
|
|
72
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
53
73
|
Metrics/CyclomaticComplexity:
|
|
54
|
-
|
|
74
|
+
Exclude:
|
|
75
|
+
- 'lib/pwn/plugins/android.rb'
|
|
55
76
|
|
|
56
|
-
# Offense count:
|
|
57
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
77
|
+
# Offense count: 1
|
|
78
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
58
79
|
Metrics/MethodLength:
|
|
59
|
-
|
|
80
|
+
Exclude:
|
|
81
|
+
- 'lib/pwn/banner/code_cave.rb'
|
|
60
82
|
|
|
61
|
-
# Offense count:
|
|
62
|
-
# Configuration parameters: CountComments, CountAsOne.
|
|
83
|
+
# Offense count: 8
|
|
84
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
63
85
|
Metrics/ModuleLength:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
Exclude:
|
|
87
|
+
- 'lib/pwn/banner/code_cave.rb'
|
|
88
|
+
- 'lib/pwn/plugins/android.rb'
|
|
89
|
+
- 'lib/pwn/plugins/black_duck_binary_analysis.rb'
|
|
90
|
+
- 'lib/pwn/plugins/ibm_appscan.rb'
|
|
91
|
+
- 'lib/pwn/plugins/msr206.rb'
|
|
92
|
+
- 'lib/pwn/plugins/nessus_cloud.rb'
|
|
93
|
+
- 'lib/pwn/plugins/open_ai.rb'
|
|
94
|
+
- 'lib/pwn/plugins/packet.rb'
|
|
70
95
|
|
|
71
96
|
# Offense count: 160
|
|
72
97
|
Style/ClassVars:
|
|
73
98
|
Enabled: false
|
|
74
99
|
|
|
75
|
-
# Offense count:
|
|
100
|
+
# Offense count: 280
|
|
76
101
|
# This cop supports safe autocorrection (--autocorrect).
|
|
77
102
|
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
|
78
103
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
|
@@ -85,12 +110,13 @@ Style/ExplicitBlockArgument:
|
|
|
85
110
|
Exclude:
|
|
86
111
|
- 'lib/pwn/plugins/nmap_it.rb'
|
|
87
112
|
|
|
88
|
-
# Offense count:
|
|
113
|
+
# Offense count: 3
|
|
89
114
|
# This cop supports safe autocorrection (--autocorrect).
|
|
90
115
|
Style/IfUnlessModifier:
|
|
91
116
|
Exclude:
|
|
92
117
|
- 'bin/pwn'
|
|
93
118
|
- 'lib/pwn/plugins/baresip.rb'
|
|
119
|
+
- 'lib/pwn/plugins/mail_agent.rb'
|
|
94
120
|
|
|
95
121
|
# Offense count: 94
|
|
96
122
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -108,7 +134,7 @@ Style/RedundantStringEscape:
|
|
|
108
134
|
- 'lib/pwn/sast/redos.rb'
|
|
109
135
|
- 'vagrant/provisioners/kali_customize.rb'
|
|
110
136
|
|
|
111
|
-
# Offense count:
|
|
137
|
+
# Offense count: 48
|
|
112
138
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
113
139
|
Style/SlicingWithRange:
|
|
114
140
|
Enabled: false
|
|
@@ -127,10 +153,3 @@ Style/SoleNestedConditional:
|
|
|
127
153
|
Style/StringLiterals:
|
|
128
154
|
Exclude:
|
|
129
155
|
- 'bin/pwn'
|
|
130
|
-
|
|
131
|
-
# Offense count: 637
|
|
132
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
133
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
134
|
-
# URISchemes: http, https
|
|
135
|
-
Layout/LineLength:
|
|
136
|
-
Max: 1620
|
data/Gemfile
CHANGED
|
@@ -40,7 +40,7 @@ gem 'jenkins_api_client2', '1.9.0'
|
|
|
40
40
|
gem 'js-beautify', '0.1.8'
|
|
41
41
|
gem 'json', '2.7.1'
|
|
42
42
|
gem 'jsonpath', '1.1.5'
|
|
43
|
-
gem 'jwt', '2.8.
|
|
43
|
+
gem 'jwt', '2.8.1'
|
|
44
44
|
gem 'libusb', '0.6.4'
|
|
45
45
|
gem 'luhn', '1.0.2'
|
|
46
46
|
gem 'mail', '2.8.1'
|
|
@@ -60,7 +60,7 @@ gem 'os', '1.1.4'
|
|
|
60
60
|
gem 'packetfu', '2.0.0'
|
|
61
61
|
gem 'packetgen', '3.3.1'
|
|
62
62
|
gem 'pdf-reader', '2.12.0'
|
|
63
|
-
gem 'pg', '1.5.
|
|
63
|
+
gem 'pg', '1.5.6'
|
|
64
64
|
gem 'pry', '0.14.2'
|
|
65
65
|
gem 'pry-doc', '1.5.0'
|
|
66
66
|
gem 'rake', '13.1.0'
|
|
@@ -73,9 +73,9 @@ gem 'rmagick', '5.4.4'
|
|
|
73
73
|
gem 'rqrcode', '2.2.0'
|
|
74
74
|
gem 'rspec', '3.13.0'
|
|
75
75
|
gem 'rtesseract', '3.1.3'
|
|
76
|
-
gem 'rubocop', '1.
|
|
76
|
+
gem 'rubocop', '1.61.0'
|
|
77
77
|
gem 'rubocop-rake', '0.6.0'
|
|
78
|
-
gem 'rubocop-rspec', '2.
|
|
78
|
+
gem 'rubocop-rspec', '2.27.1'
|
|
79
79
|
gem 'ruby-audio', '1.6.1'
|
|
80
80
|
gem 'ruby-nmap', '1.0.3'
|
|
81
81
|
gem 'ruby-saml', '1.16.0'
|
|
@@ -97,3 +97,4 @@ gem 'webrick', '1.8.1'
|
|
|
97
97
|
gem 'whois', '5.1.1'
|
|
98
98
|
gem 'whois-parser', '2.0.0'
|
|
99
99
|
gem 'wicked_pdf', '2.8.0'
|
|
100
|
+
gem 'yard', '0.9.36'
|
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
|
37
37
|
$ ./install.sh
|
|
38
38
|
$ ./install.sh ruby-gem
|
|
39
39
|
$ pwn
|
|
40
|
-
pwn[v0.5.
|
|
40
|
+
pwn[v0.5.44]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.0@pwn
|
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
|
53
53
|
$ gem install --verbose pwn
|
|
54
54
|
$ pwn
|
|
55
|
-
pwn[v0.5.
|
|
55
|
+
pwn[v0.5.44]:001 >>> PWN.help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
|
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
|
64
64
|
$ pwn
|
|
65
|
-
pwn[v0.5.
|
|
65
|
+
pwn[v0.5.44]:001 >>> PWN.help
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/bin/pwn
CHANGED
|
@@ -216,21 +216,21 @@ begin
|
|
|
216
216
|
end
|
|
217
217
|
end
|
|
218
218
|
|
|
219
|
-
Pry::Commands.create_command '
|
|
220
|
-
description '
|
|
219
|
+
Pry::Commands.create_command 'pwn-asm' do
|
|
220
|
+
description 'Initiate pwn.asm shell.'
|
|
221
221
|
|
|
222
222
|
def process
|
|
223
223
|
pi = pry_instance
|
|
224
|
-
pi.config.pwn_asm
|
|
224
|
+
pi.config.pwn_asm = true
|
|
225
225
|
end
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
Pry::Commands.create_command '
|
|
229
|
-
description '
|
|
228
|
+
Pry::Commands.create_command 'pwn-gpt' do
|
|
229
|
+
description 'Initiate pwn.gpt chat interface.'
|
|
230
230
|
|
|
231
231
|
def process
|
|
232
232
|
pi = pry_instance
|
|
233
|
-
pi.config.pwn_gpt
|
|
233
|
+
pi.config.pwn_gpt = true
|
|
234
234
|
pi.config.color = false if pi.config.pwn_gpt
|
|
235
235
|
pi.config.color = true unless pi.config.pwn_gpt
|
|
236
236
|
end
|
|
@@ -254,6 +254,18 @@ begin
|
|
|
254
254
|
end
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
+
Pry::Commands.create_command 'back' do
|
|
258
|
+
description 'Jump back to pwn REPL when in pwn-asm || pwn-gpt.'
|
|
259
|
+
|
|
260
|
+
def process
|
|
261
|
+
pi = pry_instance
|
|
262
|
+
pi.config.pwn_asm = false if pi.config.pwn_asm
|
|
263
|
+
pi.config.pwn_gpt = false if pi.config.pwn_gpt
|
|
264
|
+
pi.config.pwn_gpt_debug = false if pi.config.pwn_gpt_debug
|
|
265
|
+
pi.config.pwn_gpt_speak = false if pi.config.pwn_gpt_speak
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
257
269
|
# Define REPL Hooks
|
|
258
270
|
# Welcome Banner Hook
|
|
259
271
|
Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pi|
|
data/lib/pwn/plugins/assembly.rb
CHANGED
|
@@ -29,10 +29,40 @@ module PWN
|
|
|
29
29
|
arch_obj = Metasm::Ia32.new(endian)
|
|
30
30
|
when 'amd64', 'x86_64'
|
|
31
31
|
arch_obj = Metasm::X86_64.new(endian)
|
|
32
|
+
when 'arc'
|
|
33
|
+
arch_obj = Metasm::ARC.new(endian)
|
|
32
34
|
when 'armv4l', 'armv4b', 'armv5l', 'armv5b', 'armv6l', 'armv6b', 'armv7b', 'armv7l', 'arm', 'armhf'
|
|
33
35
|
arch_obj = Metasm::ARM.new(endian)
|
|
34
36
|
when 'aarch64', 'arm64'
|
|
35
37
|
arch_obj = Metasm::ARM64.new(endian)
|
|
38
|
+
when 'bpf'
|
|
39
|
+
arch_obj = Metasm::BPF.new(endian)
|
|
40
|
+
when 'cy16'
|
|
41
|
+
arch_obj = Metasm::CY16.new(endian)
|
|
42
|
+
when 'dalvik'
|
|
43
|
+
arch_obj = Metasm::Dalvik.new(endian)
|
|
44
|
+
when 'ebpf'
|
|
45
|
+
arch_obj = Metasm::EBPF.new(endian)
|
|
46
|
+
when 'mcs51'
|
|
47
|
+
arch_obj = Metasm::MCS51.new(endian)
|
|
48
|
+
when 'mips'
|
|
49
|
+
arch_obj = Metasm::MIPS.new(endian)
|
|
50
|
+
when 'mips64'
|
|
51
|
+
arch_obj = Metasm::MIPS64.new(endian)
|
|
52
|
+
when 'msp430'
|
|
53
|
+
arch_obj = Metasm::MSP430.new(endian)
|
|
54
|
+
when 'openrisc'
|
|
55
|
+
arch_obj = Metasm::OpenRisc.new(endian)
|
|
56
|
+
when 'ppc'
|
|
57
|
+
arch_obj = Metasm::PPC.new(endian)
|
|
58
|
+
when 'sh4'
|
|
59
|
+
arch_obj = Metasm::SH4.new(endian)
|
|
60
|
+
when 'st20'
|
|
61
|
+
arch_obj = Metasm::ST20.new(endian)
|
|
62
|
+
when 'webasm'
|
|
63
|
+
arch_obj = Metasm::WebAsm.new(endian)
|
|
64
|
+
when 'z80'
|
|
65
|
+
arch_obj = Metasm::Z80.new(endian)
|
|
36
66
|
else
|
|
37
67
|
raise "Unsupported architecture: #{arch}"
|
|
38
68
|
end
|
|
@@ -104,10 +134,40 @@ module PWN
|
|
|
104
134
|
arch_obj = Metasm::Ia32.new(endian)
|
|
105
135
|
when 'amd64', 'x86_64'
|
|
106
136
|
arch_obj = Metasm::X86_64.new(endian)
|
|
137
|
+
when 'arc'
|
|
138
|
+
arch_obj = Metasm::ARC.new(endian)
|
|
107
139
|
when 'armv4l', 'armv4b', 'armv5l', 'armv5b', 'armv6l', 'armv6b', 'armv7b', 'armv7l', 'arm', 'armhf'
|
|
108
140
|
arch_obj = Metasm::ARM.new(endian)
|
|
109
141
|
when 'aarch64', 'arm64'
|
|
110
142
|
arch_obj = Metasm::ARM64.new(endian)
|
|
143
|
+
when 'bpf'
|
|
144
|
+
arch_obj = Metasm::BPF.new(endian)
|
|
145
|
+
when 'cy16'
|
|
146
|
+
arch_obj = Metasm::CY16.new(endian)
|
|
147
|
+
when 'dalvik'
|
|
148
|
+
arch_obj = Metasm::Dalvik.new(endian)
|
|
149
|
+
when 'ebpf'
|
|
150
|
+
arch_obj = Metasm::EBPF.new(endian)
|
|
151
|
+
when 'mcs51'
|
|
152
|
+
arch_obj = Metasm::MCS51.new(endian)
|
|
153
|
+
when 'mips'
|
|
154
|
+
arch_obj = Metasm::MIPS.new(endian)
|
|
155
|
+
when 'mips64'
|
|
156
|
+
arch_obj = Metasm::MIPS64.new(endian)
|
|
157
|
+
when 'msp430'
|
|
158
|
+
arch_obj = Metasm::MSP430.new(endian)
|
|
159
|
+
when 'openrisc'
|
|
160
|
+
arch_obj = Metasm::OpenRisc.new(endian)
|
|
161
|
+
when 'ppc'
|
|
162
|
+
arch_obj = Metasm::PPC.new(endian)
|
|
163
|
+
when 'sh4'
|
|
164
|
+
arch_obj = Metasm::SH4.new(endian)
|
|
165
|
+
when 'st20'
|
|
166
|
+
arch_obj = Metasm::ST20.new(endian)
|
|
167
|
+
when 'webasm'
|
|
168
|
+
arch_obj = Metasm::WebAsm.new(endian)
|
|
169
|
+
when 'z80'
|
|
170
|
+
arch_obj = Metasm::Z80.new(endian)
|
|
111
171
|
else
|
|
112
172
|
raise "Unsupported architecture: #{arch}"
|
|
113
173
|
end
|
|
@@ -423,6 +423,47 @@ module PWN
|
|
|
423
423
|
raise e
|
|
424
424
|
end
|
|
425
425
|
|
|
426
|
+
# Supported Method Parameters::
|
|
427
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_group_statistics(
|
|
428
|
+
# token: 'required - Bearer token',
|
|
429
|
+
# group_id: 'required - group id'
|
|
430
|
+
# )
|
|
431
|
+
|
|
432
|
+
public_class_method def self.get_group_statistics(opts = {})
|
|
433
|
+
token = opts[:token]
|
|
434
|
+
group_id = opts[:group_id]
|
|
435
|
+
|
|
436
|
+
response = bd_bin_analysis_rest_call(
|
|
437
|
+
token: token,
|
|
438
|
+
rest_call: "groups/#{group_id}/statistics"
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
JSON.parse(response, symbolize_names: true)
|
|
442
|
+
rescue StandardError => e
|
|
443
|
+
raise e
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Supported Method Parameters::
|
|
447
|
+
# response = PWN::Plugins::BlackDuckBinaryAnalysis.delete_group(
|
|
448
|
+
# token: 'required - Bearer token',
|
|
449
|
+
# group_id: 'required - group id'
|
|
450
|
+
# )
|
|
451
|
+
|
|
452
|
+
public_class_method def self.delete_group(opts = {})
|
|
453
|
+
token = opts[:token]
|
|
454
|
+
group_id = opts[:group_id]
|
|
455
|
+
|
|
456
|
+
response = bd_bin_analysis_rest_call(
|
|
457
|
+
http_method: :delete,
|
|
458
|
+
token: token,
|
|
459
|
+
rest_call: "groups/#{group_id}"
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
JSON.parse(response, symbolize_names: true)
|
|
463
|
+
rescue StandardError => e
|
|
464
|
+
raise e
|
|
465
|
+
end
|
|
466
|
+
|
|
426
467
|
# Supported Method Parameters::
|
|
427
468
|
# response = PWN::Plugins::BlackDuckBinaryAnalysis.get_licenses(
|
|
428
469
|
# token: 'required - Bearer token'
|
|
@@ -687,6 +728,16 @@ module PWN
|
|
|
687
728
|
group_id: 'required - group id'
|
|
688
729
|
)
|
|
689
730
|
|
|
731
|
+
response = #{self}.get_group_statistics(
|
|
732
|
+
token: 'required - Bearer token',
|
|
733
|
+
group_id: 'required - group id'
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
response = #{self}.delete_group(
|
|
737
|
+
token: 'required - Bearer token',
|
|
738
|
+
group_id: 'required - group id'
|
|
739
|
+
)
|
|
740
|
+
|
|
690
741
|
response = #{self}.get_licenses(
|
|
691
742
|
token: 'required - Bearer token'
|
|
692
743
|
)
|
data/lib/pwn/version.rb
CHANGED
|
@@ -6,6 +6,7 @@ system("sudo touch #{alias_file}")
|
|
|
6
6
|
system("sudo chmod 777 #{alias_file}")
|
|
7
7
|
File.open(alias_file, 'w') do |f|
|
|
8
8
|
f.puts '#!/bin/bash'
|
|
9
|
+
f.puts "alias file='file --keep-going --raw'"
|
|
9
10
|
f.puts "alias grep='grep --color=auto'"
|
|
10
11
|
f.puts "alias kpid='kill -15'"
|
|
11
12
|
f.puts "alias ls='ls --color=auto'"
|
data/pwn.gemspec
CHANGED
|
@@ -6,7 +6,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
6
6
|
require 'pwn/version'
|
|
7
7
|
|
|
8
8
|
Gem::Specification.new do |spec|
|
|
9
|
-
|
|
9
|
+
ruby_version = ">= #{File.read('.ruby-version').split('-').last.chomp}".freeze
|
|
10
|
+
# spec.required_ruby_version = ruby_version
|
|
11
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
10
12
|
spec.name = 'pwn'
|
|
11
13
|
spec.version = PWN::VERSION
|
|
12
14
|
spec.authors = ['0day Inc.']
|
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.5.
|
|
4
|
+
version: 0.5.44
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -408,14 +408,14 @@ dependencies:
|
|
|
408
408
|
requirements:
|
|
409
409
|
- - '='
|
|
410
410
|
- !ruby/object:Gem::Version
|
|
411
|
-
version: 2.8.
|
|
411
|
+
version: 2.8.1
|
|
412
412
|
type: :runtime
|
|
413
413
|
prerelease: false
|
|
414
414
|
version_requirements: !ruby/object:Gem::Requirement
|
|
415
415
|
requirements:
|
|
416
416
|
- - '='
|
|
417
417
|
- !ruby/object:Gem::Version
|
|
418
|
-
version: 2.8.
|
|
418
|
+
version: 2.8.1
|
|
419
419
|
- !ruby/object:Gem::Dependency
|
|
420
420
|
name: libusb
|
|
421
421
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -674,14 +674,14 @@ dependencies:
|
|
|
674
674
|
requirements:
|
|
675
675
|
- - '='
|
|
676
676
|
- !ruby/object:Gem::Version
|
|
677
|
-
version: 1.5.
|
|
677
|
+
version: 1.5.6
|
|
678
678
|
type: :runtime
|
|
679
679
|
prerelease: false
|
|
680
680
|
version_requirements: !ruby/object:Gem::Requirement
|
|
681
681
|
requirements:
|
|
682
682
|
- - '='
|
|
683
683
|
- !ruby/object:Gem::Version
|
|
684
|
-
version: 1.5.
|
|
684
|
+
version: 1.5.6
|
|
685
685
|
- !ruby/object:Gem::Dependency
|
|
686
686
|
name: pry
|
|
687
687
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -856,14 +856,14 @@ dependencies:
|
|
|
856
856
|
requirements:
|
|
857
857
|
- - '='
|
|
858
858
|
- !ruby/object:Gem::Version
|
|
859
|
-
version: 1.
|
|
859
|
+
version: 1.61.0
|
|
860
860
|
type: :runtime
|
|
861
861
|
prerelease: false
|
|
862
862
|
version_requirements: !ruby/object:Gem::Requirement
|
|
863
863
|
requirements:
|
|
864
864
|
- - '='
|
|
865
865
|
- !ruby/object:Gem::Version
|
|
866
|
-
version: 1.
|
|
866
|
+
version: 1.61.0
|
|
867
867
|
- !ruby/object:Gem::Dependency
|
|
868
868
|
name: rubocop-rake
|
|
869
869
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -884,14 +884,14 @@ dependencies:
|
|
|
884
884
|
requirements:
|
|
885
885
|
- - '='
|
|
886
886
|
- !ruby/object:Gem::Version
|
|
887
|
-
version: 2.
|
|
887
|
+
version: 2.27.1
|
|
888
888
|
type: :runtime
|
|
889
889
|
prerelease: false
|
|
890
890
|
version_requirements: !ruby/object:Gem::Requirement
|
|
891
891
|
requirements:
|
|
892
892
|
- - '='
|
|
893
893
|
- !ruby/object:Gem::Version
|
|
894
|
-
version: 2.
|
|
894
|
+
version: 2.27.1
|
|
895
895
|
- !ruby/object:Gem::Dependency
|
|
896
896
|
name: ruby-audio
|
|
897
897
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -1172,6 +1172,20 @@ dependencies:
|
|
|
1172
1172
|
- - '='
|
|
1173
1173
|
- !ruby/object:Gem::Version
|
|
1174
1174
|
version: 2.8.0
|
|
1175
|
+
- !ruby/object:Gem::Dependency
|
|
1176
|
+
name: yard
|
|
1177
|
+
requirement: !ruby/object:Gem::Requirement
|
|
1178
|
+
requirements:
|
|
1179
|
+
- - '='
|
|
1180
|
+
- !ruby/object:Gem::Version
|
|
1181
|
+
version: 0.9.36
|
|
1182
|
+
type: :runtime
|
|
1183
|
+
prerelease: false
|
|
1184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
1185
|
+
requirements:
|
|
1186
|
+
- - '='
|
|
1187
|
+
- !ruby/object:Gem::Version
|
|
1188
|
+
version: 0.9.36
|
|
1175
1189
|
description: https://github.com/0dayinc/pwn/README.md
|
|
1176
1190
|
email:
|
|
1177
1191
|
- request.pentest@0dayinc.com
|