pwn 0.5.221 → 0.5.222
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/Gemfile +1 -1
- data/README.md +3 -3
- data/lib/pwn/plugins/assembly.rb +19 -5
- data/lib/pwn/plugins/repl.rb +6 -1
- data/lib/pwn/version.rb +1 -1
- data/third_party/pwn_rdoc.jsonl +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd6e555a2d8ef7c201ec907f9fc623d2f6c858b55a6c951294c972209a3e83b8
|
4
|
+
data.tar.gz: 283f21e8170868880e244160a37ad2dbcd2541671816b053c539e92e6138034c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4359266db4d1beac5b074f475b58a89192dde95c259349eb1a0b563241a113cb50f0b151e671aaefd95aa206e17701f51358f9da4e3f2967e7d1a712989039
|
7
|
+
data.tar.gz: f63f5a254a37976e203bd4faa5818eeeb8e7a32c1f718e8c4b87a7b7b928b0f92a5ab3bc4dc6bb541d8706075785e9e20e8467fda12eda76d2621929d2e24730
|
data/Gemfile
CHANGED
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.222]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.222]: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.222]: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
@@ -13,14 +13,21 @@ module PWN
|
|
13
13
|
# opcodes: 'required - hex escaped opcode(s) (e.g. "\x90\x90\x90")',
|
14
14
|
# opcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',
|
15
15
|
# arch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',
|
16
|
-
# endian: 'optional - endianess (defaults to
|
16
|
+
# endian: 'optional - endianess :big|:little (defaults to current system endianess)'
|
17
17
|
# )
|
18
18
|
|
19
19
|
public_class_method def self.opcodes_to_asm(opts = {})
|
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]
|
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
|
+
|
24
31
|
endian = endian.to_sym if opts[:endian]
|
25
32
|
|
26
33
|
raise 'ERROR: opcodes parameter is required.' if opcodes.nil?
|
@@ -118,13 +125,20 @@ module PWN
|
|
118
125
|
# PWN::Plugins::Assembly.asm_to_opcodes(
|
119
126
|
# asm: 'required - assembly instruction(s) (e.g. 'nop\nnop\nnop\njmp rsp\n)',
|
120
127
|
# arch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',
|
121
|
-
# endian: 'optional - endianess (defaults to
|
128
|
+
# endian: 'optional - endianess :big|:little (defaults to current system endianess)'
|
122
129
|
# )
|
123
130
|
|
124
131
|
public_class_method def self.asm_to_opcodes(opts = {})
|
125
132
|
asm = opts[:asm]
|
126
133
|
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
127
134
|
endian = opts[:endian] ||= :little
|
135
|
+
|
136
|
+
if opts[:endian].nil? && [1].pack('I') == [1].pack('N')
|
137
|
+
endian = :big
|
138
|
+
else
|
139
|
+
endian = :little
|
140
|
+
end
|
141
|
+
|
128
142
|
endian = endian.to_sym if opts[:endian]
|
129
143
|
|
130
144
|
asm_tmp = Tempfile.new('pwn_asm')
|
@@ -243,13 +257,13 @@ module PWN
|
|
243
257
|
opcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',
|
244
258
|
opcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',
|
245
259
|
arch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',
|
246
|
-
endian: 'optional - endianess (defaults to
|
260
|
+
endian: 'optional - endianess :big|:little (defaults to system endianess)'
|
247
261
|
)
|
248
262
|
|
249
263
|
#{self}.asm_to_opcodes(
|
250
264
|
asm: 'required - assembly instruction(s) (e.g. 'nop\nnop\nnop\njmp rsp\n)',
|
251
265
|
arch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',
|
252
|
-
endian: 'optional - endianess (defaults to
|
266
|
+
endian: 'optional - endianess :big|:little (defaults to system endianess)'
|
253
267
|
)
|
254
268
|
|
255
269
|
#{self}.list_supported_archs
|
data/lib/pwn/plugins/repl.rb
CHANGED
@@ -31,8 +31,13 @@ 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
|
34
|
+
arch = pi.config.pwn_asm_arch || PWN::Plugins::DetectOS.arch
|
35
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
|
36
41
|
|
37
42
|
pi.config.prompt_name = "pwn.asm:#{arch}/#{endian}"
|
38
43
|
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
@@ -431,6 +431,7 @@
|
|
431
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 :little)'\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
|
+
{"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"}]}
|
434
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 :little)'\n\n)\n"}]}
|
435
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"}]}
|
436
437
|
{"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.help Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.help`: "}]}
|
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.222
|
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-12-
|
11
|
+
date: 2024-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -828,14 +828,14 @@ dependencies:
|
|
828
828
|
requirements:
|
829
829
|
- - '='
|
830
830
|
- !ruby/object:Gem::Version
|
831
|
-
version: 6.
|
831
|
+
version: 6.9.0
|
832
832
|
type: :development
|
833
833
|
prerelease: false
|
834
834
|
version_requirements: !ruby/object:Gem::Requirement
|
835
835
|
requirements:
|
836
836
|
- - '='
|
837
837
|
- !ruby/object:Gem::Version
|
838
|
-
version: 6.
|
838
|
+
version: 6.9.0
|
839
839
|
- !ruby/object:Gem::Dependency
|
840
840
|
name: rest-client
|
841
841
|
requirement: !ruby/object:Gem::Requirement
|