pwn 0.4.993 → 0.4.995
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/README.md +3 -3
- data/lib/pwn/plugins/xxd.rb +16 -10
- 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: ae602e512383cce909706ed97051ce4722de37fa71755db51eb3b8fae3d165a4
|
4
|
+
data.tar.gz: 217136716efe82d5966df746e269d05d1bf5e0870fd459e0f1cf8e149c609bba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0de31dddfd05dca90867504fc8caed707033ddbfbb61c72e94742caaf8bc06dab4a205e39a43234261f3d5155295e954b22a03eb303f11a7096db8efac52e989
|
7
|
+
data.tar.gz: b5e874b009d937cd2c7520dc272a03ed421613b6ec9e008cca6ba7299ee7a6d0e3b492fdfc91e13d4318d4b29e5e75972072dabd9c65d5aeacb634a9d5bb0e25
|
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.995]: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.4.
|
55
|
+
pwn[v0.4.995]: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.995]: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,18 +33,16 @@ module PWN
|
|
33
33
|
io.write(fmt_row)
|
34
34
|
|
35
35
|
if hashed
|
36
|
-
hashed_hexdump[
|
36
|
+
hashed_hexdump[fmt_row.split.first.delete(':').to_s] = {
|
37
37
|
hex: fmt_row.split[1..8],
|
38
38
|
ascii: fmt_row.split[9..-1].join
|
39
39
|
}
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
if hashed
|
44
|
-
|
45
|
-
|
46
|
-
return io.string
|
47
|
-
end
|
43
|
+
return hashed_hexdump if hashed
|
44
|
+
|
45
|
+
io.string unless hashed
|
48
46
|
rescue StandardError => e
|
49
47
|
raise e
|
50
48
|
end
|
@@ -62,11 +60,19 @@ module PWN
|
|
62
60
|
|
63
61
|
raise ArgumentError, 'output file is required' if file.nil?
|
64
62
|
|
65
|
-
#
|
63
|
+
# If hexdump is hashed leveraging the dump method, convert to string
|
64
|
+
if hexdump.is_a?(Hash)
|
65
|
+
hexdump = hexdump.map do |k, v|
|
66
|
+
format(
|
67
|
+
"%<s1>07s0: %<s2>-40s %<s3>-16s\n",
|
68
|
+
s1: k,
|
69
|
+
s2: v[:hex].join(' '),
|
70
|
+
s3: v[:ascii]
|
71
|
+
)
|
72
|
+
end.join
|
73
|
+
end
|
74
|
+
|
66
75
|
binary_data = hexdump.lines.map do |line|
|
67
|
-
# Works but overly complicated
|
68
|
-
# line.chars[10..-19].join.split.map do |hex|
|
69
|
-
# More simple better
|
70
76
|
line.split[1..8].map do |hex|
|
71
77
|
[hex].pack('H*')
|
72
78
|
end.join
|
data/lib/pwn/version.rb
CHANGED