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
Tag Cloud
CRM 2011
(161)
CRM 4.0
(144)
C#
(116)
JScript
(109)
Plugin
(92)
Registry
(90)
Techpedia
(77)
PyS60
(68)
WScript
(43)
Plugin Message
(31)
Exploit
(27)
ShellCode
(26)
FAQ
(22)
JavaScript
(21)
Killer Codes
(21)
Hax
(18)
VB 6.0
(17)
Commands
(16)
VBScript
(16)
Quotes
(15)
Turbo C++
(13)
WMI
(13)
Security
(11)
1337
(10)
Tutorials
(10)
Asp.Net
(9)
Safe Boot
(9)
Python
(8)
Interview Questions
(6)
video
(6)
Ajax
(5)
VC++
(5)
WebService
(5)
Workflow
(5)
Bat
(4)
Dorks
(4)
Sql Server
(4)
Aptitude
(3)
Picklist
(3)
Tweak
(3)
WCF
(3)
regex
(3)
Config
(2)
LINQ
(2)
PHP
(2)
Shell
(2)
Silverlight
(2)
TSql
(2)
flowchart
(2)
serialize
(2)
ASHX
(1)
CRM 4.0 Videos
(1)
Debug
(1)
FetchXml
(1)
GAC
(1)
General
(1)
Generics
(1)
HttpWebRequest
(1)
InputParameters
(1)
Lookup
(1)
Offline Plug-ins
(1)
OutputParameters
(1)
Plug-in Constructor
(1)
Protocol
(1)
RIA
(1)
Sharepoint
(1)
Walkthrough
(1)
Web.config
(1)
design patterns
(1)
generic
(1)
iframe
(1)
secure config
(1)
unsecure config
(1)
url
(1)
Pages
Showing posts with label WScript. Show all posts
Showing posts with label WScript. Show all posts
Wednesday, April 24, 2013
Change Admin Password
Wednesday, August 03, 2011
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
Labels:
WScript
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
Labels:
WScript
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
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..."
ws.Run("notepad.exe")
WScript.Sleep(1000)
For c=1 To Len(str)
WScript.Sleep(100) 'Increase the value for longer delay
ws.SendKeys Mid(str,c,1)
Next
Labels:
WScript
Tuesday, August 02, 2011
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>
Labels:
WScript
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>
Labels:
WScript
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>
Labels:
WScript
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\"
Labels:
WScript
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\"
Labels:
WScript
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\"
Labels:
WScript
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"
Labels:
WScript
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"
Labels:
WScript
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"
Labels:
WScript
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"
Labels:
WScript
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"
Labels:
WScript
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"
Labels:
WScript
Monday, August 01, 2011
Disallow running an application
Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKCR\Software\Microsoft\Windows\Current
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
msgbox "completed"
' the above script will disallow running FASMW.EXE
Labels:
WScript
Disallow running an application
Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKCR\Software\Microsoft\Windows\Current
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
msgbox "completed"
' the above script will disallow running FASMW.EXE
Labels:
WScript
Disallow running an application
Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKCR\Software\Microsoft\Windows\Current
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
msgbox "completed"
' the above script will disallow running FASMW.EXE
Labels:
WScript
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
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
Labels:
WScript
Subscribe to:
Posts (Atom)