Skip to content

Commit 5e436e0

Browse files
committed
PWN::Plugins::Assembly module - more #rubocop
1 parent 88935fb commit 5e436e0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.5.20]:001 >>> PWN.help
40+
pwn[v0.5.21]:001 >>> PWN.help
4141
```
4242

4343
[![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
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.5.20]:001 >>> PWN.help
55+
pwn[v0.5.21]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.5.20]:001 >>> PWN.help
65+
pwn[v0.5.21]:001 >>> PWN.help
6666
```
6767

6868
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:

lib/pwn/plugins/assembly.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ module Plugins
77
# This plugin converts images to readable text
88
module Assembly
99
# Supported Method Parameters::
10-
# PWN::Plugins::Assembly.opcode_to_asm(
11-
# opcodes: 'required - hex escaped opcode(s) (e.g. '\x90\x90\x90')'
10+
# PWN::Plugins::Assembly.opcodes_to_asm(
11+
# opcodes: 'required - hex escaped opcode(s) (e.g. "\x90\x90\x90")'
1212
# )
1313

1414
public_class_method def self.opcodes_to_asm(opts = {})
@@ -24,7 +24,7 @@ module Assembly
2424
end
2525

2626
# Supported Method Parameters::
27-
# PWN::Plugins::Assembly.asm_to_opcode(
27+
# PWN::Plugins::Assembly.asm_to_opcodes(
2828
# asm: 'required - assembly instruction(s) (e.g. 'nop\nnop\nnop\njmp rsp\n)'
2929
# )
3030

@@ -43,7 +43,8 @@ module Assembly
4343
rescue StandardError => e
4444
raise e
4545
ensure
46-
FileUtils.rm_f("#{asm_tmp.path}*") if File.exist?(asm_tmp.path)
46+
files = [asm_tmp.path, asm_tmp_o]
47+
FileUtils.rm_f(files) if File.exist?(asm_tmp.path)
4748
end
4849

4950
# Author(s):: 0day Inc. <[email protected]>
@@ -59,7 +60,7 @@ module Assembly
5960
public_class_method def self.help
6061
puts "USAGE:
6162
#{self}.opcodes_to_asm(
62-
opcodes: 'required - hex escaped opcode(s) (e.g. '\\x90\\x90\\x90')'
63+
opcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")'
6364
)
6465
6566
#{self}.asm_to_opcodes(

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.5.20'
4+
VERSION = '0.5.21'
55
end

0 commit comments

Comments
 (0)