pwn 0.5.34 → 0.5.35

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: f879ebdd5ad454c5a57dab480906a255c1a1c9551c33895b346417f26b320784
4
- data.tar.gz: e78218a0680ed4982aad8a13e5368bfac5fc5b04b548a1bd2410389ce2945c0a
3
+ metadata.gz: 8f41a4c6cbab245a2f57337769fd1ea372c76c23e4a6201f5537ebe7b0490d11
4
+ data.tar.gz: 331cdf2b24514db9a043d86d0694973320fbcebed6b2921e25287ca196c3d9b6
5
5
  SHA512:
6
- metadata.gz: d94948a701a5716491c3c058168c34ffd16038e07c048a4284f4471c47a00b8a79122c4562e47a068ff249c24fbcd4575bc8df7b81518c589c9648ca2f8d6c03
7
- data.tar.gz: 1b9d36a3f3ee1f4a54a7cb7cce7a40ecbd47eff55593dd38f479604d7ed21c8bc8a17e4fcdd4db1f252b87052d985eac468d31420a14b51df0eb6fae47c7e191
6
+ metadata.gz: 7c3c16d7e8e78092772c587dcb25203d33fc56d055f436e11683c255281ff7c26073d1abf1dde98cb4a89c8f9ca244431d0cf7d740af90e05b2324de274b9b2c
7
+ data.tar.gz: 8150d8a01bd4c416a34910e1d52c431362232e1b1f1f22252e60ffbece533ad8809f9e8a4b2b93e607a7ae9c54dd031ab01b38057480c7da3daf07d84062b56b
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.34]:001 >>> PWN.help
40
+ pwn[v0.5.35]: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.5.34]:001 >>> PWN.help
55
+ pwn[v0.5.35]: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.5.34]:001 >>> PWN.help
65
+ pwn[v0.5.35]: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:
@@ -33,15 +33,20 @@ module PWN
33
33
  raise "Unsupported architecture: #{arch}"
34
34
  end
35
35
 
36
- # TOOD: Fix this
37
- # If opcodes appear to be '"90", "90", "90"' then convert to "\x90\x90\x90"
38
- # opcodes = opcodes.split(',').map { |x| format('\x%02x', x.gsub('"', '').to_i(16)) }.join if opcodes.include?('"') && opcodes.include?(',')
39
-
40
- # If opcodes appear to be '90 90 90' then convert to "\x90\x90\x90"
41
- # opcodes = opcodes.split.map { |x| format('\x%02x', x.to_i(16)) }.join if opcodes.include?(' ')
42
-
43
- # If opcodes appear to be '909090' then convert to "\x90\x90\x90"
44
- # opcodes = opcodes.chars.each_slice(2).map(&:join).map { |x| format('\x%02x', x.to_i(16)) }.join if opcodes.length.even?
36
+ # TOOD: Still needs a fix if opcodes is passed in as:
37
+ # '\x90\x90\x90' (not to be confused w/ "\x90\x90\x90")
38
+ # '909090'
39
+ opcodes_orig_len = opcodes.length
40
+ opcodes = opcodes.map { |code| [code].pack('H*') }.join if opcodes.is_a?(Array)
41
+ opcodes.delete!('\x') if opcodes.include?('\x')
42
+ opcodes.delete!('"') if opcodes.include?('"')
43
+ opcodes.delete!("'") if opcodes.include?("'")
44
+ opcodes.delete!(',') if opcodes.include?(',')
45
+ opcodes.delete!("\s") if opcodes.include?("\s")
46
+
47
+ # puts opcodes.inspect
48
+ opcodes = [opcodes].pack('H*') if opcodes.length.even? && opcodes.length != opcodes_orig_len
49
+ # puts opcodes.inspect
45
50
 
46
51
  Metasm::Shellcode.disassemble(arch_obj, opcodes).to_s
47
52
  rescue StandardError => e
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.5.34'
4
+ VERSION = '0.5.35'
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.5.34
4
+ version: 0.5.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.