pwn 0.5.222 → 0.5.224
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 +2 -16
- data/lib/pwn/plugins/detect_os.rb +15 -0
- data/lib/pwn/plugins/repl.rb +2 -7
- data/lib/pwn/version.rb +1 -1
- data/third_party/pwn_rdoc.jsonl +2 -2
- 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: 5f3053bc992855c9b715f45c3fcff263a3f57db584cd097f4e08ee8f4e25bf8b
|
4
|
+
data.tar.gz: 84a413505b53fd6f44acf96f37f4e289a6e3fa0ecdaa8ebf83d58a3819b5902f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41bcce03db3746b62b81956ee9005c13025399e18daa1ece513a0c83c7a3bf98258d30832982456675f5cccc8ba8eb56d62e3fe7adb60bb27614375c328914a8
|
7
|
+
data.tar.gz: 01c830874cf6badcf5fe365b0d6b2e01bc5c41f5a4c6ec22c62d0d597cdbea8c2d193b3b9d5d8a502b1989eef9bdc97e9e04ce4bc1bd35306772c76f17ff5675
|
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.224]: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.5@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.224]: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.5@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.224]: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
@@ -20,14 +20,7 @@ module PWN
|
|
20
20
|
opcodes = opts[:opcodes]
|
21
21
|
opcodes_always_string_obj = opts[:opcodes_always_string_obj] ||= false
|
22
22
|
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
23
|
-
endian = opts[:endian]
|
24
|
-
|
25
|
-
if opts[:endian].nil? && [1].pack('I') == [1].pack('N')
|
26
|
-
endian = :big
|
27
|
-
else
|
28
|
-
endian = :little
|
29
|
-
end
|
30
|
-
|
23
|
+
endian = opts[:endian] ||= PWN::Plugins::DetectOS.endian
|
31
24
|
endian = endian.to_sym if opts[:endian]
|
32
25
|
|
33
26
|
raise 'ERROR: opcodes parameter is required.' if opcodes.nil?
|
@@ -131,14 +124,7 @@ module PWN
|
|
131
124
|
public_class_method def self.asm_to_opcodes(opts = {})
|
132
125
|
asm = opts[:asm]
|
133
126
|
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
134
|
-
endian = opts[:endian] ||=
|
135
|
-
|
136
|
-
if opts[:endian].nil? && [1].pack('I') == [1].pack('N')
|
137
|
-
endian = :big
|
138
|
-
else
|
139
|
-
endian = :little
|
140
|
-
end
|
141
|
-
|
127
|
+
endian = opts[:endian] ||= PWN::Plugins::DetectOS.endian
|
142
128
|
endian = endian.to_sym if opts[:endian]
|
143
129
|
|
144
130
|
asm_tmp = Tempfile.new('pwn_asm')
|
@@ -32,6 +32,19 @@ module PWN
|
|
32
32
|
raise e
|
33
33
|
end
|
34
34
|
|
35
|
+
# Supported Method Parameters::
|
36
|
+
# PWN::Plugins::DetectOS.endian
|
37
|
+
|
38
|
+
public_class_method def self.endian
|
39
|
+
if [1].pack('I') == [1].pack('N')
|
40
|
+
:big
|
41
|
+
else
|
42
|
+
:little
|
43
|
+
end
|
44
|
+
rescue StandardError => e
|
45
|
+
raise e
|
46
|
+
end
|
47
|
+
|
35
48
|
# Author(s):: 0day Inc. <support@0dayinc.com>
|
36
49
|
|
37
50
|
public_class_method def self.authors
|
@@ -48,6 +61,8 @@ module PWN
|
|
48
61
|
|
49
62
|
#{self}.arch
|
50
63
|
|
64
|
+
#{self}.endian
|
65
|
+
|
51
66
|
#{self}.authors
|
52
67
|
"
|
53
68
|
end
|
data/lib/pwn/plugins/repl.rb
CHANGED
@@ -31,13 +31,8 @@ module PWN
|
|
31
31
|
dchars = "\001\e[33m\002***\001\e[0m\002" if mode == :splat
|
32
32
|
|
33
33
|
if pi.config.pwn_asm
|
34
|
-
arch = pi.config.pwn_asm_arch
|
35
|
-
endian = pi.config.pwn_asm_endian
|
36
|
-
if endian.nil? && [1].pack('I') == [1].pack('N')
|
37
|
-
endian = 'big'
|
38
|
-
else
|
39
|
-
endian = 'little'
|
40
|
-
end
|
34
|
+
arch = pi.config.pwn_asm_arch ||= PWN::Plugins::DetectOS.arch
|
35
|
+
endian = pi.config.pwn_asm_endian ||= PWN::Plugins::DetectOS.endian
|
41
36
|
|
42
37
|
pi.config.prompt_name = "pwn.asm:#{arch}/#{endian}"
|
43
38
|
name = "\001\e[1m\002\001\e[37m\002#{pi.config.prompt_name}\001\e[0m\002"
|
data/lib/pwn/version.rb
CHANGED
data/third_party/pwn_rdoc.jsonl
CHANGED
@@ -428,11 +428,11 @@
|
|
428
428
|
{"messages":[{"role":"user","content":"PWN::Plugins::Android.screen_record Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.screen_record`: Supported Method Parameters\n\nPWN::Plugins::Android.screen_record(\n\nadb_path: 'required - path to adb binary',\ndest: 'optional - destination path to save screen record file (defaults to /sdcard/screen.mp4)',\nas_root: 'optional - boolean (defaults to true)'\n\n)\n"}]}
|
429
429
|
{"messages":[{"role":"user","content":"PWN::Plugins::Android.swipe Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.swipe`: Supported Method Parameters\n\nPWN::Plugins::Android.swipe(\n\nadb_path: 'required - path to adb binary',\ndirection: 'required - direction to swipe (:up|:down|:left|:right)'\n\n)\n"}]}
|
430
430
|
{"messages":[{"role":"user","content":"PWN::Plugins::Android.take_screenshot Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.take_screenshot`: Supported Method Parameters\n\nPWN::Plugins::Android.take_screenshot(\n\nadb_path: 'required - path to adb binary',\ndest: 'optional - destination path to save screenshot file (defaults to /sdcard/screen.png)',\nas_root: 'optional - boolean (defaults to true)'\n\n)\n"}]}
|
431
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.asm_to_opcodes Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.asm_to_opcodes`: Supported Method Parameters\n\nPWN::Plugins::Assembly.asm_to_opcodes(\n\nasm: 'required - assembly instruction(s) (e.g. 'nop\\nnop\\nnop\\njmp rsp\\n)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess (defaults to
|
431
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.asm_to_opcodes Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.asm_to_opcodes`: Supported Method Parameters\n\nPWN::Plugins::Assembly.asm_to_opcodes(\n\nasm: 'required - assembly instruction(s) (e.g. 'nop\\nnop\\nnop\\njmp rsp\\n)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess :big|:little (defaults to current system endianess)'\n\n)\n"}]}
|
432
432
|
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
433
433
|
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.help Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.help`: "}]}
|
434
434
|
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.list_supported_archs Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.list_supported_archs`: Supported Method Parameters\n\nPWN::Plugins::Assembly.list_archs\n"}]}
|
435
|
-
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.opcodes_to_asm Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.opcodes_to_asm`: Supported Method Parameters\n\nPWN::Plugins::Assembly.opcodes_to_asm(\n\nopcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',\nopcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess (defaults to
|
435
|
+
{"messages":[{"role":"user","content":"PWN::Plugins::Assembly.opcodes_to_asm Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.opcodes_to_asm`: Supported Method Parameters\n\nPWN::Plugins::Assembly.opcodes_to_asm(\n\nopcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',\nopcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess :big|:little (defaults to current system endianess)'\n\n)\n"}]}
|
436
436
|
{"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
|
437
437
|
{"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.help Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.help`: "}]}
|
438
438
|
{"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.mask_password Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.mask_password`: Supported Method Parameters\n\nPWN::Plugins::AuthenticationHelper.mask_password(\n\nprompt: 'optional - string to display at prompt'\n\n)\n"}]}
|