pwn 0.5.21 → 0.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/assembly.rb +7 -4
- 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: 15749f47853a4b45e74230feed45754ace51556f464cf43f37dbb27dad3ede54
|
4
|
+
data.tar.gz: fc41034c5b35f20dfa42eca23546d7fbf77e328f705f269b0a0d46169e78c48e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 660c31ae940155bf196aeca986719ecdc74af3e82b83a6a4a99881a04c090483665049313dbb14de645eabc937a1bb6640c198019a70e0ef71fac57c1077959c
|
7
|
+
data.tar.gz: 2a9ae878f1b5ea2cd67dd76243d05470f31a299b68c9df2f3c738f17c56a21ec1657753a218204deca7162aed437e3827a188a7d30bbfacc994575629a80f122
|
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.22]: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.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.22]: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.22]: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/lib/pwn/plugins/assembly.rb
CHANGED
@@ -8,15 +8,17 @@ module PWN
|
|
8
8
|
module Assembly
|
9
9
|
# Supported Method Parameters::
|
10
10
|
# PWN::Plugins::Assembly.opcodes_to_asm(
|
11
|
-
# opcodes: 'required - hex escaped opcode(s) (e.g. "\x90\x90\x90")'
|
11
|
+
# opcodes: 'required - hex escaped opcode(s) (e.g. "\x90\x90\x90")',
|
12
|
+
# arch: 'optional - objdump -i architecture (defaults to i386)'
|
12
13
|
# )
|
13
14
|
|
14
15
|
public_class_method def self.opcodes_to_asm(opts = {})
|
15
16
|
opcodes = opts[:opcodes]
|
17
|
+
arch = opts[:arch] || 'i386'
|
16
18
|
|
17
19
|
opcodes_tmp = Tempfile.new('pwn_opcodes')
|
18
20
|
File.binwrite(opcodes_tmp.path, opcodes)
|
19
|
-
`objdump -
|
21
|
+
`objdump --disassemble-all --target binary --architecture #{arch} #{opcodes_tmp.path}`
|
20
22
|
rescue StandardError => e
|
21
23
|
raise e
|
22
24
|
ensure
|
@@ -39,7 +41,7 @@ module PWN
|
|
39
41
|
|
40
42
|
asm_tmp_o = "#{asm_tmp.path}.o"
|
41
43
|
system('as', '-o', asm_tmp_o, asm_tmp.path)
|
42
|
-
`objdump -
|
44
|
+
`objdump --disassemble-all #{asm_tmp.path}.o`
|
43
45
|
rescue StandardError => e
|
44
46
|
raise e
|
45
47
|
ensure
|
@@ -60,7 +62,8 @@ module PWN
|
|
60
62
|
public_class_method def self.help
|
61
63
|
puts "USAGE:
|
62
64
|
#{self}.opcodes_to_asm(
|
63
|
-
opcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")'
|
65
|
+
opcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',
|
66
|
+
arch: 'optional - objdump -i architecture (defaults to i386)'
|
64
67
|
)
|
65
68
|
|
66
69
|
#{self}.asm_to_opcodes(
|
data/lib/pwn/version.rb
CHANGED