Skip to content

Commit 1736112

Browse files
committed
PWN::Plugins::Assembly module - more #rubocop
1 parent 00934b6 commit 1736112

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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.19]:001 >>> PWN.help
40+
pwn[v0.5.20]: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.19]:001 >>> PWN.help
55+
pwn[v0.5.20]: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.19]:001 >>> PWN.help
65+
pwn[v0.5.20]: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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ module Assembly
3737
asm_tmp.write(asm_code)
3838
asm_tmp.close
3939

40-
system('as', '-o', "#{asm_tmp.path}.o", asm_tmp.path)
40+
asm_tmp_o = "#{asm_tmp.path}.o"
41+
system('as', '-o', asm_tmp_o, asm_tmp.path)
4142
`objdump -D #{asm_tmp.path}.o`
4243
rescue StandardError => e
4344
raise e
4445
ensure
45-
asm_tmp.unlink if File.exist?(asm_tmp.path)
46-
File.unlink("#{asm_tmp.path}.o") if File.exist?("#{asm_tmp.path}.o")
46+
FileUtils.rm_f("#{asm_tmp.path}*") if File.exist?(asm_tmp.path)
4747
end
4848

4949
# Author(s):: 0day Inc. <[email protected]>

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.19'
4+
VERSION = '0.5.20'
55
end

0 commit comments

Comments
 (0)