pwn 0.5.27 → 0.5.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f1ea9548288e21a0244334d041665ef010188153ced0a62a598f9c65762cb9f
4
- data.tar.gz: 14d726eb8de99d5f1225914d4e14279ffdbc60bf42280fddb49b785e711b8875
3
+ metadata.gz: 2101652a60fb389367aacf244b4c975dead09d60c54477b9934973987a8fc482
4
+ data.tar.gz: 9c8356773210bc613a0269a7a1fd6d3887ec5b95e44b0504eaa4c9286fd8f704
5
5
  SHA512:
6
- metadata.gz: 722a2c4dde5b0f8e834961c346c290ea0915a48f0df694113356b0cb83124c3f02eb679f18a94127101091eb21484089fdfea457bacd465bb96c847f19e54bcf
7
- data.tar.gz: 8c98e7597db6d2af007604b566b2c938ed8e3459546352e3b6b4f2ff4aeae7e8c25dc5dacf33a813cee0e3e7d68b52771a21216e5484bd37170c5a6023d06696
6
+ metadata.gz: 48eaf2f4e8492d2f1e56be69eb6892e3454586737f9079f4c9fa8e0296a8e4995afcdd4b0661de83d299709a4d8676564d4af4493d21025d4b1ac43eecc8da0a
7
+ data.tar.gz: da678e3969e10269b0847bade883aedd20c3b818915c64a6ecda0d29b4433f1ecff3251827d638cda612ff467ab5d9ac71fdb86197d7f8312cb4db33fde290ad
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.27]:001 >>> PWN.help
40
+ pwn[v0.5.29]: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.27]:001 >>> PWN.help
55
+ pwn[v0.5.29]: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.27]:001 >>> PWN.help
65
+ pwn[v0.5.29]: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:
@@ -32,6 +32,15 @@ module PWN
32
32
  raise "Unsupported architecture: #{arch}"
33
33
  end
34
34
 
35
+ # If opcodes appear to be '"90", "90", "90"' then convert to "\x90\x90\x90"
36
+ opcodes = opcodes.split(',').map { |x| format('\x%02x', x.gsub('"', '').to_i(16)) }.join if opcodes.include?('"') && opcodes.include?(',')
37
+
38
+ # If opcodes appear to be '90 90 90' then convert to "\x90\x90\x90"
39
+ opcodes = opcodes.split.map { |x| format('\x%02x', x.to_i(16)) }.join if opcodes.include?(' ')
40
+
41
+ # If opcodes appear to be '909090' then convert to "\x90\x90\x90"
42
+ opcodes = opcodes.scan(/../).map { |x| format('\x%02x', x.to_i(16)) }.join if opcodes.length.even?
43
+
35
44
  Metasm::Shellcode.disassemble(arch_obj, opcodes).to_s
36
45
  rescue StandardError => e
37
46
  raise e
@@ -62,7 +71,7 @@ module PWN
62
71
  raise "Unsupported architecture: #{arch}"
63
72
  end
64
73
 
65
- Metasm::Shellcode.assemble(arch_obj, asm).encode_string
74
+ Metasm::Shellcode.assemble(arch_obj, asm).encode_string.bytes.map { |b| format('\x%02x', b) }.join
66
75
  rescue StandardError => e
67
76
  raise e
68
77
  end
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.27'
4
+ VERSION = '0.5.29'
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.27
4
+ version: 0.5.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.