mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
set LHOST in docker
This commit is contained in:
parent
faf01ed5ef
commit
23e97f4ea9
@ -1,5 +1,10 @@
|
||||
<ruby>
|
||||
run_single("setg LHOST #{ENV['LHOST']}") if ENV['LHOST']
|
||||
run_single("setg LPORT #{ENV['LPORT']}") if ENV['LPORT']
|
||||
if ENV['LHOST']
|
||||
lhost = ENV['LHOST']
|
||||
else
|
||||
lhost = %x(hostname -i)
|
||||
end
|
||||
run_single("setg LHOST #{lhost}")
|
||||
run_single("db_connect #{ENV['DATABASE_URL'].gsub('postrgres://', '')}") if ENV['DATABASE_URL']
|
||||
</ruby>
|
||||
|
Loading…
Reference in New Issue
Block a user