Skip to content

Commit b1c87af

Browse files
committed
*.sh in pwn repo root - bugfix in PWN_ROOT assignment when building within cloned ssrc
1 parent ab3eb54 commit b1c87af

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
3737
$ rvm list gemsets
3838
$ gem install --verbose pwn
3939
$ pwn
40-
pwn[v0.4.411]:001 >>> PWN.help
40+
pwn[v0.4.412]: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.1.2@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.411]:001 >>> PWN.help
55+
pwn[v0.4.412]:001 >>> PWN.help
5656
```
5757

5858

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

packer/provisioners/upload_globals.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ fi
1212
sudo tee -a $pwn_env_file << EOF
1313
export PWN_ROOT=\$(
1414
source /etc/profile.d/rvm.sh; \
15-
ruby -r pwn -e 'puts "#{Gem.path.first}/gems/pwn-#{PWN::VERSION}"' \
16-
2> /dev/null
15+
if [[ -d '/opt/pwn' ]]; then \
16+
printf '/opt/pwn'; \
17+
else \
18+
ruby -r pwn -e 'puts "#{Gem.path.first}/gems/pwn-#{PWN::VERSION}"' \
19+
2> /dev/null; \
20+
fi
1721
)
1822
export PWN_PROVIDER='${pwn_provider}'
1923
EOF

vagrant/provisioners/upload_globals.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ fi
1212
sudo tee -a $pwn_env_file << EOF
1313
export PWN_ROOT=\$(
1414
source /etc/profile.d/rvm.sh; \
15-
ruby -r pwn -e 'puts "#{Gem.path.first}/gems/pwn-#{PWN::VERSION}"' \
16-
2> /dev/null
15+
if [[ -d '/opt/pwn' ]]; then \
16+
printf '/opt/pwn'; \
17+
else \
18+
ruby -r pwn -e 'puts "#{Gem.path.first}/gems/pwn-#{PWN::VERSION}"' \
19+
2> /dev/null; \
20+
fi
1721
)
1822
export PWN_PROVIDER='${pwn_provider}'
1923
EOF

0 commit comments

Comments
 (0)