![Imagen](http://i.imgur.com/bW7PJt5.png)
Código: Seleccionar todo
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
Local $hGUI = GUICreate("Google Chrome Password Recovery", 410, 260)
Local $hListview = GUICtrlCreateListView("", 5, 5, 400, 200, $LVS_REPORT, $LVS_EX_GRIDLINES)
Local $Boton = GUICtrlCreateButton("Get Passwords", 165, 220, 80, 30)
GUISetBkColor(0x0000)
_GUICtrlListView_InsertColumn($hListview, 0, "Url", 100)
_GUICtrlListView_InsertColumn($hListview, 1, "Username", 100)
_GUICtrlListView_InsertColumn($hListview, 2, "Password", 100)
_GUICtrlListView_SetColumnWidth($hListview, 0, 200)
_GUICtrlListView_SetColumnWidth($hListview, 1, 98)
_GUICtrlListView_SetColumnWidth($hListview, 2, 98)
GUISetState(@SW_SHOW)
Local $aArray = 0
Local $Pass = ""
While 1
$idMsg = GUIGetMsg()
Select
Case $idMsg = $GUI_EVENT_CLOSE
ExitLoop
Case $idMsg = $Boton
_GUICtrlListView_DeleteAllItems($hListview)
$aArray = Recovery()
For $i = 1 To UBound($aArray) - 1
$Pass = UncryptRDPPassword($aArray[$i][5])
If Not (Binary($Pass) = "0x00000000") Then
_GUICtrlListView_AddItem($hListview, $aArray[$i][0])
_GUICtrlListView_AddSubItem($hListview, _GUICtrlListView_GetItemCount($hListview) - 1, $aArray[$i][3], 1)
_GUICtrlListView_AddSubItem($hListview, _GUICtrlListView_GetItemCount($hListview) - 1, $Pass, 2)
EndIf
$Pass = ""
Next
$aArray = 0
EndSelect
WEnd
Func Recovery()
Local $aResult, $iRows, $iColumns, $iRval, $hData
Local $sDataLoginPath = @LocalAppDataDir & "\Google\Chrome\User Data\Default\Login Data"
Local $TempData = @TempDir & "\TempData.db"
Local $sPathData = ""
FileCopy($sDataLoginPath, $TempData, 1)
If FileExists($TempData) Then
$sPathData = $TempData
EndIf
_SQLite_Startup()
If @error Then
MsgBox($MB_SYSTEMMODAL, "SQLite Error", "SQLite.dll Can't be Loaded!")
Exit -1
EndIf
$hData = _SQLite_Open($sPathData)
If @error Then
MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Can't Load Database!")
Exit -1
EndIf
$iRval = _SQLite_GetTable2d(-1, "SELECT * FROM logins;", $aResult, $iRows, $iColumns)
_SQLite_Close($hData)
_SQLite_Shutdown()
If FileExists($TempData) Then
FileDelete($TempData)
EndIf
Return $aResult
EndFunc ;==>Recovery
Func UncryptRDPPassword($bin)
;This Func From >> http://www.autoitscript.com/forum/topic/96783-dllcall-for-cryptunprotectdata/#entry695769
Local Const $CRYPTPROTECT_UI_FORBIDDEN = 0x1
Local Const $DATA_BLOB = "int;ptr"
Local $passStr = DllStructCreate("byte[1024]")
Local $DataIn = DllStructCreate($DATA_BLOB)
Local $DataOut = DllStructCreate($DATA_BLOB)
$pwDescription = 'psw'
$PwdHash = ""
DllStructSetData($DataOut, 1, 0)
DllStructSetData($DataOut, 2, 0)
DllStructSetData($passStr, 1, $bin)
DllStructSetData($DataIn, 2, DllStructGetPtr($passStr, 1))
DllStructSetData($DataIn, 1, BinaryLen($bin))
$return = DllCall("crypt32.dll", "int", "CryptUnprotectData", _
"ptr", DllStructGetPtr($DataIn), _
"ptr", 0, _
"ptr", 0, _
"ptr", 0, _
"ptr", 0, _
"dword", $CRYPTPROTECT_UI_FORBIDDEN, _
"ptr", DllStructGetPtr($DataOut))
If @error Then Return ""
$len = DllStructGetData($DataOut, 1)
$PwdHash = Ptr(DllStructGetData($DataOut, 2))
$PwdHash = DllStructCreate("byte[" & $len & "]", $PwdHash)
Return BinaryToString(DllStructGetData($PwdHash, 1), 4)
EndFunc ;==>UncryptRDPPassword