pwn 0.4.994 → 0.4.996
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/xxd.rb +34 -7
- 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: c3f80997dd3c119faded4b20095334177b665ee9ea3bfb635c871da71e76a60f
|
4
|
+
data.tar.gz: 3e60827de4c62543149da6f2876e897b22e0733f981b8a161335b1d674b6808d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6aff2ee2aa115240881fee61c23c4b3cfbc0e43fca667bc014c1d8c9e70714341135b3823e8388208537d4297c8e06440e7e39c8cf30a2cd2219266a717df5a
|
7
|
+
data.tar.gz: 1f6c722118317f68827bfb398bde69c54fc60c2d61e22efffb3245f5aa5614e474cbab3a59ed0ce639bff958536978e117283a0c993649ebebf4454fae9b1a0b
|
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.4.
|
40
|
+
pwn[v0.4.996]: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.4.
|
55
|
+
pwn[v0.4.996]: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.4.
|
65
|
+
pwn[v0.4.996]: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/xxd.rb
CHANGED
@@ -33,10 +33,29 @@ module PWN
|
|
33
33
|
io.write(fmt_row)
|
34
34
|
|
35
35
|
if hashed
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
# TODO: Fix NoMethodError: undefined method `join' for nil
|
37
|
+
# when fmt_row looks like:
|
38
|
+
# 000f4b20: 0000 0000 0000 0000 ........
|
39
|
+
# fmt_row_col_len = fmt_row.split.length
|
40
|
+
# if fmt_row_col_len > 10
|
41
|
+
# fmt_row.split[9..-1].join
|
42
|
+
# end
|
43
|
+
this_key = fmt_row.split.first.delete(':').to_s
|
44
|
+
hashed_hexdump[this_key] = {
|
45
|
+
hex: fmt_row.split[1..-2],
|
46
|
+
ascii: fmt_row.split[-1]
|
39
47
|
}
|
48
|
+
|
49
|
+
hhh_len = hashed_hexdump[this_key][:hex].length
|
50
|
+
# TODO: address last line if the hashed_hexdump[this_key][:hex] length is less than 8
|
51
|
+
if hhh_len > 8
|
52
|
+
mov_to_ascii = (hhh_len - 8) * -1
|
53
|
+
last_ascii = hashed_hexdump[this_key][:ascii]
|
54
|
+
hashed_hexdump[this_key][:hex][-1] = "#{hashed_hexdump[this_key][:hex].last}\s"
|
55
|
+
hashed_hexdump[this_key][:hex][8] = "\s#{hashed_hexdump[this_key][:hex][8]}"
|
56
|
+
hashed_hexdump[this_key][:ascii] = "#{hashed_hexdump[this_key][:hex][mov_to_ascii..-1].join(' ')}#{last_ascii}"
|
57
|
+
hashed_hexdump[this_key][:hex] = hashed_hexdump[this_key][:hex][0..7]
|
58
|
+
end
|
40
59
|
end
|
41
60
|
end
|
42
61
|
|
@@ -60,11 +79,19 @@ module PWN
|
|
60
79
|
|
61
80
|
raise ArgumentError, 'output file is required' if file.nil?
|
62
81
|
|
63
|
-
#
|
82
|
+
# If hexdump is hashed leveraging the dump method, convert to string
|
83
|
+
if hexdump.is_a?(Hash)
|
84
|
+
hexdump = hexdump.map do |k, v|
|
85
|
+
format(
|
86
|
+
"%<s1>07s0: %<s2>-40s %<s3>-16s\n",
|
87
|
+
s1: k,
|
88
|
+
s2: v[:hex].join(' '),
|
89
|
+
s3: v[:ascii]
|
90
|
+
)
|
91
|
+
end.join
|
92
|
+
end
|
93
|
+
|
64
94
|
binary_data = hexdump.lines.map do |line|
|
65
|
-
# Works but overly complicated
|
66
|
-
# line.chars[10..-19].join.split.map do |hex|
|
67
|
-
# More simple better
|
68
95
|
line.split[1..8].map do |hex|
|
69
96
|
[hex].pack('H*')
|
70
97
|
end.join
|
data/lib/pwn/version.rb
CHANGED