Showing posts with label WScript. Show all posts
Showing posts with label WScript. Show all posts

Change Admin Password

sNewPassword = "pass"

Set oWshNet = CreateObject("WScript.Network")
sComputer = oWshNet.ComputerName
sAdminName = GetAdministratorName

On Error Resume Next
Set oUser = GetObject("WinNT://" & sComputer & "/" & sAdminName & ",user")
oUser.SetPassword sNewPassword
oUser.SetInfo
On Error Goto 0
msgbox "done"

Function GetAdministratorName()

Dim sUserSID, oWshNetwork, oUserAccount

Set oWshNetwork = CreateObject("WScript.Network")
Set oUserAccounts = GetObject( _
"winmgmts://" & oWshNetwork.ComputerName & "/root/cimv2") _
.ExecQuery("Select Name, SID from Win32_UserAccount" _
& " WHERE Domain = '" & oWshNetwork.ComputerName & "'")

On Error Resume Next
For Each oUserAccount In oUserAccounts
If Left(oUserAccount.SID, 9) = "S-1-5-21-" And _
Right(oUserAccount.SID, 4) = "-500" Then
GetAdministratorName = oUserAccount.Name
Exit For
End if
Next
End Function

Make your XP Type

Set ws = CreateObject("WScript.Shell")

str = "Hi there... ~ Dont click your mouse while i am typing." & _
" ~~This is a send key example, using which you can send your keystrokes" & _
"to any application you want.~~" & _
"you can increase the value of sleep to for longer delay~~" & _
"So enjoy~Napstr Rulz..." 

Refresh 5


<job id="Refresh">
      <script language="VBScript">
Dim Wsh         
For c = 0 to 10
set Wsh = WScript.CreateObject("WScript.Shell")
Wsh.SendKeys "{F5}"
'WScript.Sleep 10
Next
</Script>
</job>

Using Wscript to read & write Registry entries


'[VBScript]
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY"
WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\MindReader", "Goocher!","REG_SZ"

bKey = WshShell.RegRead("HKCU\Software\ACME\FortuneTeller\")
WScript.Echo WshShell.RegRead("HKCU\Software\ACME\FortuneTeller\MindReader")
WshShell.RegDelete "HKCU\Software\ACME\FortuneTeller\MindReader"
WshShell.RegDelete "HKCU\Software\ACME\FortuneTeller\"
WshShell.RegDelete "HKCU\Software\ACME\"

Add stuffs to right click


' Add stuffs to right click"
Set objShell = CreateObject("WScript.Shell")

objShell.RegWrite "HKCR\*\Shell\MenuText\Command\", _
    "cmd.exe /k cd.. " & Chr(34) & "%1%" & Chr(34) 
objShell.RegWrite "HKCR\*\Shell\MenuText\", "Browse CMD"


objShell.RegWrite "HKCR\*\Shell\MenuText2\Command\", _
    "Notepad2.exe " & Chr(34) & "%1" & Chr(34) & "%*"
objShell.RegWrite "HKCR\*\Shell\MenuText2\", "LOOK INSIDE"


objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    "cmd.exe /k cd " & Chr(34) & "%1%" & Chr(34) 
objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "CMD it"


msgbox "Browse CMD -- ADDED " & vbcrlf & "LOOK INSIDE -- ADDED" & _
vbcrlf & "CMD it -- ADDED" & vbcrlf &  "Write Click by ULTIMATE NAPSTR ",,"Write Click"

Open with Notepad


Set objShell = CreateObject("WScript.Shell")

objShell.RegWrite "HKCR\*\Shell\MenuText2\Command\", _
    "Notepad2.exe " & Chr(34) & "%1" & Chr(34) & "%*"
objShell.RegWrite "HKCR\*\Shell\MenuText2\", "Notepad2"

Disallow running an application

Set objShell = CreateObject("WScript.Shell")

objShell.RegWrite "HKCR\Software\Microsoft\Windows\Current

Version\Policies\Explorer\DisallowRun","C:\FASM\FASMW.EXE" & "=" & "FASMW.EXE"
msgbox "completed"

' the above script will disallow running FASMW.EXE

Delete Old computer accounts

' Delete Old computer accounts from AC

Dim OutPutFile
Dim FileSystem

Set FileSystem = WScript.CreateObject("Scripting.FileSyst

emObject")
Set OutPutFile = FileSystem.CreateTextFile("bad_comp_names.txt", True)

On Error Resume Next

DomainString=Inputbox("Enter the domain name","Check Active Computers","DomainName")

if DomainString="" then
wscript.echo "No domain specified or script cancelled."
wscript.quit
end if

numDays=InputBox("What is the number of days to use as a cutoff for" & _
"Active Computer Accounts?","Check Active Computers","XX")

if numDays="" then
wscript.echo "No cutoff date specified or script cancelled."
wscript.quit
end if

Set DomainObj = GetObject("WinNT://"&DomainString)

if err.number<>0 then
wscript.echo "Error connecting to " & DomainString
wscript.quit
end if

DomainObj.Filter = Array("computer")
Wscript.echo " Computer Accounts in " & DomainString & " older than " & numDays & " days"
For each Computer in DomainObj
Set Account = GetObject("WinNT://" & DomainString & "/" & Computer.Name & "$")
RefreshTime = FormatNumber((Account.get("PasswordAge")
)/86400,0)
If CInt(RefreshTime) >= CInt(numDays) Then
'wscript.echo "**DELETE** " & Computer.Name & " Password Age is " & RefreshTime & " days."
OutPutFile.WriteLine Computer.Name
'Call DomainObj.Delete("Computer", Computer.Name)
End If
Next

Amazing Shutdown

Set ws = CreateObject("WScript.Shell")
Set t = CreateObject("Shell.Application")
Set v = CreateObject("SAPI.SpVoice")
't.FileRun
str = "You can't shutdown the real napstr~ You might be amazed to see what i am gonna do ~ Black Hat Napstr"

ws.Run("notepad.exe")
WScript.Sleep(1000)
ws.SendKeys("cmd ~")
For c=1 To Len(str)
WScript.Sleep(10)

ws.SendKeys Mid(str,c,1)

Next
t.ShutdownWindows

Rename the My Computer Icon on the Local Computer

' Rename the My Computer Icon on the Local Computer
' supported on: Windows 2000, Windows XP, Windows Server 2003


Const MY_COMPUTER = &H11&

Set objNetwork = CreateObject("Wscript.Network")
objComput

erName = objNetwork.ComputerName
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
objFolderItem.Name = objComputerName'"WARLOC410"

Remove Restrictions

On Error Resume Next
dim r,d,str
str="Enable Registry Editing"

Set r = CreateObject("Wscript.Shell")

r.RegWrite "HKCU\Software\Microsoft\Windows\Current

Version\Policies\System\DisableTaskMgr","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools","0","REG_DWORD"
r.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell","explorer.exe"
r.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN\CheckValue","2","REG_DWORD"
r.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN\DefaultValue","2","REG_DWORD"
r.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckValue","0","REG_DWORD"
r.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\DefaultValue","2","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRun","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFileMenu","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSaveSettings","0","REG_DWORD"
r.RegWrite "HKCU\Software\Policies\Microsoft\Windows\System\DisableCMD","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip","1","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowCompColor","1","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowInfoTip","1","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideIcons","0","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\Current
Version\Explorer\Advanced\WebView","1","REG_DWORD"
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SuperHidden","1","REG_DWORD"

'code end here

MsgBox "All Restrictions Cleared",,"Clear"
Msgbox "Disable taskManager" & chr(32) & "NO" & chr(13) & "Disable Regisitry Tools" & chr(32) & "NO"

Enable/Disable Hidden Files

'Restriction: Disable "Hidden Files"
On Error Resume Next
dim r,d,str
str="Restriction: Disable Hidden Files "

d = MsgBox("This will disable the hidden files in your computer" & vbcrlf & "Click yes/no to Enable/Disable Restriction",1,str)
Set r = CreateObject("Wscript.Shell")
if d=1 then
r.RegWrite "HKCU\Software\Microsoft\Windows\Current

Version\Explorer\Advanced\Hidden","0","REG_DWORD"
msgbox "Restriction : ENABLED",0,str
else
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden","1","REG_DWORD"
msgbox "Restriction : DISABLED",0,str
end if

Enable/Disable "turn off Computer"

On Error Resume Next
dim r,d,str
str="Restriction: Disable 'turn off Computer' "

d = MsgBox("This will disable the shutdown option" & vbcrlf & "Click yes/no to Enable/Disable Restriction",1,str)
Set r = CreateObject("Wscript.Shell")
if d=1 then
r.RegWrite "HKCU\Software\Microsoft\Windows\Current

Version\Policies\Explorer\NoClose","1","REG_SZ"
msgbox "Restriction : ENABLED",0,str
else
r.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose","0","REG_SZ"
msgbox "Restriction : DISABLED",0,str
end if

Run Command with right click

Set objShell = CreateObject("WScript.Shell")

objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
"cmd.exe /k cd " & Chr(34) & "%1" & Chr(34)
objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Run Command Prompt"