pwn 0.4.997 → 0.4.998

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00e2539631c3d4ff5bbbeb46cc8d8cd485bd1896e886ae09a64eba3e13b2b3da
4
- data.tar.gz: 42b305a53a3ba7ec0f5bedb66b2fdb75a9a4141645da5ba6c8e24b6fafc3afe4
3
+ metadata.gz: cac940079d0b92c64a2840ddbf5047054bd9fae459a8e2116718a459d38c89a8
4
+ data.tar.gz: a406df38b12ddbe4fff9c38595acfee3283fa07dbe36358d2fc94ce81f19b2ef
5
5
  SHA512:
6
- metadata.gz: 12bee8b0dca7ff774c85918e2a0a0cba4ea697aff4e1056afca2c9c8be1fc0d4076264e9d1886ddb32e8b5ed0c377fef021a8cdff9063948cfa330add77eb93c
7
- data.tar.gz: 6bf5559a1035b1e863a63e81eb66424f4d9a419e6a6f1cb6bc21e9fedc7c48dcc82c2a72f176e20f99c3916a14c118a2d7e6f265dbd9b31afbf7b98b341310e0
6
+ metadata.gz: 9c1510fac2f278c898a2cdfbda33d08299aa9e806dae7d0a8caf3fe728719b183c01732cb6b5a2dc0844d55a2b483bcbb109361ffd0c971f3f9d519d18c3bab6
7
+ data.tar.gz: 9d222ef5f74c0b16561222412917dffab7728191e09c065e9f39f85d62ba6aba1829b154de566ffbb7b5c6fa35db8b1d2b6767055a6e2af6438bc9f6060990d4
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.997]:001 >>> PWN.help
40
+ pwn[v0.4.998]: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.997]:001 >>> PWN.help
55
+ pwn[v0.4.998]: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.997]:001 >>> PWN.help
65
+ pwn[v0.4.998]: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:
@@ -5,7 +5,7 @@ module PWN
5
5
  # This module provides the abilty to dump binaries in hex format
6
6
  module XXD
7
7
  # Supported Method Parameters::
8
- # PWN::Plugins::XXD.dump(
8
+ # hexdump = PWN::Plugins::XXD.dump(
9
9
  # file: 'required - path to binary file to dump',
10
10
  # hashed: 'optional - return hexdump as hash instead of string (default: false)'
11
11
  # )
@@ -36,7 +36,7 @@ module PWN
36
36
  this_key = fmt_row.chars[0..7].join
37
37
  if fmt_row.length == 68
38
38
  hashed_hexdump[this_key] = {
39
- hex: fmt_row.chars[10..48].join.split,
39
+ hex: fmt_row.chars[10..48].join.delete("\s").scan(/../),
40
40
  ascii: fmt_row.chars[51..-2].join
41
41
  }
42
42
  else
@@ -44,7 +44,7 @@ module PWN
44
44
  hex_len = (rem_len / 3) * 2
45
45
  ascii_len = rem_len / 3
46
46
  hashed_hexdump[this_key] = {
47
- hex: fmt_row.chars[10..(10 + hex_len)].join.split,
47
+ hex: fmt_row.chars[10..(10 + hex_len)].join.delete("\s").scan(/../),
48
48
  ascii: fmt_row.chars[(10 + hex_len + 1)..-1].join
49
49
  }
50
50
  end
@@ -60,7 +60,7 @@ module PWN
60
60
 
61
61
  # Supported Method Parameters::
62
62
  # PWN::Plugins::XXD.reverse_dump(
63
- # hexdump: 'required - hexdump string to reverse dump'
63
+ # hexdump: 'required - hexdump returned from #dump method',
64
64
  # file: 'required - path to binary file to dump'
65
65
  # )
66
66
 
@@ -77,10 +77,11 @@ module PWN
77
77
  format(
78
78
  "%<s1>07s0: %<s2>-40s %<s3>-16s\n",
79
79
  s1: k,
80
- s2: v[:hex].join(' '),
80
+ s2: v[:hex].each_slice(2).map { |slice| slice.join }.join(' '),
81
81
  s3: v[:ascii]
82
82
  )
83
83
  end.join
84
+ puts hexdump
84
85
  end
85
86
 
86
87
  binary_data = hexdump.lines.map do |line|
@@ -106,13 +107,13 @@ module PWN
106
107
 
107
108
  public_class_method def self.help
108
109
  puts "USAGE:
109
- #{self}.dump(
110
+ hexdump = #{self}.dump(
110
111
  file: 'required - path to binary file to dump',
111
112
  hashed: 'optional - return hexdump as hash instead of string (default: false)'
112
113
  )
113
114
 
114
115
  #{self}.reverse_dump(
115
- hexdump: 'required - hexdump string to reverse dump',
116
+ hexdump: 'required - hexdump returned from #dump method',
116
117
  file: 'required - path to binary file to dump'
117
118
  )
118
119
 
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.997'
4
+ VERSION = '0.4.998'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.997
4
+ version: 0.4.998
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.