Really fix the empty LHOST bug
git-svn-id: file:///home/svn/framework3/trunk@5431 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7b10ffbae6
commit
c546d6ec9c
|
@ -69,11 +69,13 @@ module ReversePhp
|
|||
def php_reverse_shell
|
||||
|
||||
if (!datastore['LHOST'] or datastore['LHOST'].empty?)
|
||||
# LHOST should always be set when we get here... but in case it isn't,
|
||||
raise Rex::ArgumentError, "LHOST is required"
|
||||
# datastore is empty on msfconsole startup
|
||||
ipaddr = 0x7f000001
|
||||
port = 4444
|
||||
else
|
||||
ipaddr = datastore['LHOST'].split(/\./).map{|c| c.to_i}.pack("C*").unpack("N").first
|
||||
port = datastore['LPORT']
|
||||
end
|
||||
ipaddr = datastore['LHOST'].split(/\./).map{|c| c.to_i}.pack("C*").unpack("N").first
|
||||
port = datastore['LPORT']
|
||||
|
||||
#
|
||||
# The regex looks like this unobfuscated:
|
||||
|
|
Loading…
Reference in New Issue