pwn 0.4.996 → 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: c3f80997dd3c119faded4b20095334177b665ee9ea3bfb635c871da71e76a60f
4
- data.tar.gz: 3e60827de4c62543149da6f2876e897b22e0733f981b8a161335b1d674b6808d
3
+ metadata.gz: cac940079d0b92c64a2840ddbf5047054bd9fae459a8e2116718a459d38c89a8
4
+ data.tar.gz: a406df38b12ddbe4fff9c38595acfee3283fa07dbe36358d2fc94ce81f19b2ef
5
5
  SHA512:
6
- metadata.gz: c6aff2ee2aa115240881fee61c23c4b3cfbc0e43fca667bc014c1d8c9e70714341135b3823e8388208537d4297c8e06440e7e39c8cf30a2cd2219266a717df5a
7
- data.tar.gz: 1f6c722118317f68827bfb398bde69c54fc60c2d61e22efffb3245f5aa5614e474cbab3a59ed0ce639bff958536978e117283a0c993649ebebf4454fae9b1a0b
6
+ metadata.gz: 9c1510fac2f278c898a2cdfbda33d08299aa9e806dae7d0a8caf3fe728719b183c01732cb6b5a2dc0844d55a2b483bcbb109361ffd0c971f3f9d519d18c3bab6
7
+ data.tar.gz: 9d222ef5f74c0b16561222412917dffab7728191e09c065e9f39f85d62ba6aba1829b154de566ffbb7b5c6fa35db8b1d2b6767055a6e2af6438bc9f6060990d4
data/Gemfile CHANGED
@@ -52,7 +52,7 @@ gem 'net-openvpn', '0.8.7'
52
52
  gem 'net-smtp', '0.4.0.1'
53
53
  gem 'nexpose', '7.3.0'
54
54
  gem 'nokogiri', '1.16.0'
55
- gem 'nokogiri-diff', '0.2.0'
55
+ gem 'nokogiri-diff', '0.3.0'
56
56
  gem 'oily_png', '1.2.1'
57
57
  gem 'open3', '0.2.1'
58
58
  gem 'os', '1.1.4'
@@ -76,7 +76,7 @@ gem 'rubocop', '1.60.2'
76
76
  gem 'rubocop-rake', '0.6.0'
77
77
  gem 'rubocop-rspec', '2.26.1'
78
78
  gem 'ruby-audio', '1.6.1'
79
- gem 'ruby-nmap', '1.0.2'
79
+ gem 'ruby-nmap', '1.0.3'
80
80
  gem 'ruby-saml', '1.16.0'
81
81
  gem 'rvm', '1.11.3.9'
82
82
  gem 'savon', '2.14.0'
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.996]: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.996]: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.996]: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
  # )
@@ -33,28 +33,20 @@ module PWN
33
33
  io.write(fmt_row)
34
34
 
35
35
  if hashed
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]
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]
36
+ this_key = fmt_row.chars[0..7].join
37
+ if fmt_row.length == 68
38
+ hashed_hexdump[this_key] = {
39
+ hex: fmt_row.chars[10..48].join.delete("\s").scan(/../),
40
+ ascii: fmt_row.chars[51..-2].join
41
+ }
42
+ else
43
+ rem_len = fmt_row[10..-1].length
44
+ hex_len = (rem_len / 3) * 2
45
+ ascii_len = rem_len / 3
46
+ hashed_hexdump[this_key] = {
47
+ hex: fmt_row.chars[10..(10 + hex_len)].join.delete("\s").scan(/../),
48
+ ascii: fmt_row.chars[(10 + hex_len + 1)..-1].join
49
+ }
58
50
  end
59
51
  end
60
52
  end
@@ -68,7 +60,7 @@ module PWN
68
60
 
69
61
  # Supported Method Parameters::
70
62
  # PWN::Plugins::XXD.reverse_dump(
71
- # hexdump: 'required - hexdump string to reverse dump'
63
+ # hexdump: 'required - hexdump returned from #dump method',
72
64
  # file: 'required - path to binary file to dump'
73
65
  # )
74
66
 
@@ -85,10 +77,11 @@ module PWN
85
77
  format(
86
78
  "%<s1>07s0: %<s2>-40s %<s3>-16s\n",
87
79
  s1: k,
88
- s2: v[:hex].join(' '),
80
+ s2: v[:hex].each_slice(2).map { |slice| slice.join }.join(' '),
89
81
  s3: v[:ascii]
90
82
  )
91
83
  end.join
84
+ puts hexdump
92
85
  end
93
86
 
94
87
  binary_data = hexdump.lines.map do |line|
@@ -114,13 +107,13 @@ module PWN
114
107
 
115
108
  public_class_method def self.help
116
109
  puts "USAGE:
117
- #{self}.dump(
110
+ hexdump = #{self}.dump(
118
111
  file: 'required - path to binary file to dump',
119
112
  hashed: 'optional - return hexdump as hash instead of string (default: false)'
120
113
  )
121
114
 
122
115
  #{self}.reverse_dump(
123
- hexdump: 'required - hexdump string to reverse dump',
116
+ hexdump: 'required - hexdump returned from #dump method',
124
117
  file: 'required - path to binary file to dump'
125
118
  )
126
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.996'
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.996
4
+ version: 0.4.998
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -576,14 +576,14 @@ dependencies:
576
576
  requirements:
577
577
  - - '='
578
578
  - !ruby/object:Gem::Version
579
- version: 0.2.0
579
+ version: 0.3.0
580
580
  type: :runtime
581
581
  prerelease: false
582
582
  version_requirements: !ruby/object:Gem::Requirement
583
583
  requirements:
584
584
  - - '='
585
585
  - !ruby/object:Gem::Version
586
- version: 0.2.0
586
+ version: 0.3.0
587
587
  - !ruby/object:Gem::Dependency
588
588
  name: oily_png
589
589
  requirement: !ruby/object:Gem::Requirement
@@ -912,14 +912,14 @@ dependencies:
912
912
  requirements:
913
913
  - - '='
914
914
  - !ruby/object:Gem::Version
915
- version: 1.0.2
915
+ version: 1.0.3
916
916
  type: :runtime
917
917
  prerelease: false
918
918
  version_requirements: !ruby/object:Gem::Requirement
919
919
  requirements:
920
920
  - - '='
921
921
  - !ruby/object:Gem::Version
922
- version: 1.0.2
922
+ version: 1.0.3
923
923
  - !ruby/object:Gem::Dependency
924
924
  name: ruby-saml
925
925
  requirement: !ruby/object:Gem::Requirement