|
Database Password RecoveryIf you don't remember your password, this will help you.
File Name : force_db.vbs Requirement : ODBC and a connection configured to the database Author : Jean-Luc Antoine Submitted : 08/09/2001 Category : 4K option explicit
Dim DataConn, y, PWDVal
' **** Modify these two lines ****
Const dsnVal="My Data Source Name From the Control Panel"
const UIDVal="MYLOGIN"
'*** and this line if you want to speed up
Const Alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/*-+$_"
'Restart in console mode to display logs
if Right(ucase(wscript.FullName),11)="WSCRIPT.EXE" then
Set y = WScript.CreateObject("WScript.Shell")
y.Run "cscript.exe " & wscript.ScriptFullName , 1
wscript.quit
end if
Set DataConn = CreateObject("ADODB.Connection")
PWDVal = Left(Alphabet,1)
Dim x
x=0
Do while Not OpenODBC
x=x+1
'Avoid displaying all : for speed
If x Mod 20 =0 Then wscript.echo PWDVal
GenerePWD
Loop
'WScript.Echo OpenODBC
WScript.Echo "Found : " & PWDVal
Sub GenerePWD
Dim c,R
c=Right(Alphabet,1)
Do While (Right(PWDVal,1)=c) And (PWDVal<>"")
If PWDVal=c Then
PWDVal=""
R=R & Left(Alphabet,1)
Else
PWDVal=Left(PWDVal,Len(PWDVAL)-1)
End If
R=R & Left(Alphabet,1)
Loop
If PWDVal<>"" then
PWDVal=Left(PWDVal,Len(PWDVAL)-1) & Mid(Alphabet,Instr(Alphabet,Right(PWDVal,1))+1,1)
End If
PWDVal=PWDVal & R
End Sub
Function OpenODBC()
OpenODBC = False
On Error resume next
DataConn.open "DSN=" & DsnVal & ";UID=" & UIDVal & ";PWD=" & PWDVal & ";"
If Err.Number=0 then
OpenODBC = True
End If
End Function
|
|||||
|
|