The candy thief of the security baby.  
"The Information Security Suppository"
This site contains adult themes, and   
may not be suitable for our younger  
viewers.  Parental discretion is advised.
  Home | Add To Favorites | Print This Page | Close

 

 

 

 

'<header>

'Copyright BaudBox ISG, 2001

'This code was made (originally) at Waffle House on 10+ cups of coffee
'then transcribed straight to web from fluid stained pages.  Take a guess
'at whether I'll certify this code as "well-and-good".  No.  This code is
'untested, yet well formed enough to give you a good idea how to do
'something, even if it *doesn't* work.  It should though.

'</header>

'DO NOT MODIFY THIS HEADER IN ANY WAY, OR YOU WILL
'BE BREAKING COPYRIGHT LAW.  Do not remove, copy, or distribute
'in whole, or part, any of this code without the header. 

'In non-legalese...
'Please give me props in your proggie for the code I slung.

	  
Dim Dom, Usr, Ans, flag

WScript.Echo "Enter the Lusers Domain: "
	Dom = WScript.StdIn.ReadLine()

WScript.Echo "Enter LuserName: "
	Usr = WScript.StdIn.ReadLine()

Set oUser = GetObject("WINNT://" & Dom & "/" & Usr & ",user")

Dom = "" : Usr = ""

WScript.Echo vbCrLf & "(R)estore or (D)isable this Luser: "
	Ans = WScript.StdIn.ReadLine()

Select Case LCase(Ans)
	If CStr(LCase(oUser.AccountDisabled)) = "true" Then
		flag = oUser.Get("UserFlags") - 2
		oUser.Put "UserFlags", flag
		oUser.SetInfo
	  WScript.Echo oUser.Name " is Enabled."
	End If
	If CStr(LCase(oUser.IsAccountLocked)) = "true" Then
		flag = oUser.Get("UserFlags") - 16
		oUser.Put "UserFlags", flag
		oUser.SetInfo
	  WScript.Echo oUser.Name " is Unlocked."
	End If
Case "d"
	If CStr(LCase(oUser.AccountDisabled)) = "false" Then
		flag = oUser.Get("UserFlags") + 2
		oUser.Put "UserFlags", flag
		oUser.SetInfo
	  WScript.Echo oUser.Name " is Disabled."
	End If
	If CStr(LCase(oUser.IsAccountLocked)) = "false" Then
		flag = oUser.Get("UserFlags") + 16
		oUser.Put "UserFlags", flag
		oUser.SetInfo
	  WScript.Echo oUser.Name " is Locked."
	End If
End Select