Jump to content

[SOLVED] Trouble to access Google Chrome database


Recommended Posts

Hello,

I'm wanting catch all stored urls in Google Chrome and as example I had found a code that promisse return all logins (with passwords) stored on Chrome database, but this example don't have worked for me. 

PS: I have several logins stored in Chrome database

Some have a idea about this, because this don't work?

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=beta
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Language=1080
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
     #include <MsgBoxConstants.au3>
     #include <CryptProtect.au3>
     #include <sqlite.au3>
     #include <sqlite.dll.au3>
 
     Opt("TrayIconHide",1)
 
     $file=@scriptdir &"\passwords.txt"
     if fileexists($file) then filedelete($file)
     $file_handle= fileopen($file ,1)
     if $file_handle<>-1 then
     filewrite($file_handle, chrome() )
     fileflush($file_handle)
     fileclose($file_handle)
     endif
 
     func chrome()
     local $q, $r, $pwds,$fn=envget("localappdata") & "\google\chrome\user data\default\login data"
     if fileexists($fn)=false then return ""
     _sqlite_startup()
     _sqlite_open($fn)
     _sqlite_query(-1, "select * from logins;", $q)
     while _sqlite_fetchdata($q, $r) = 0
     $pwds = $pwds & "url: "& $r[0] & @crlf &"usr: "& $r[3] & @crlf &"pwd: "& _CryptUnprotectData( $r[5],"") & @crlf & @crlf
     wend
     _sqlite_close()
     _sqlite_shutdown()
     return $pwds
     endfunc

 

Edited by flashcoder
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...