Jump to content

firefox 14 cookies.sqlite


 Share

Recommended Posts

hey guys. I think my problem is why my SQL statement, which means im screwed because i suck with SQL. I keep getting errors that are different depending if i change the SQL statement.

#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <array.au3>

Local $aResult, $iRows, $iColumns, $iRval

_SQLite_Startup()

_SQLite_Open("C:UsersUSERNAMEAppDataRoamingMozillaFirefoxProfilesMUMBOJUMBO.defaultcookies.sqlite")

$iRval = _SQLite_GetTable2d(-1, "SELECT * FROM *;", $aResult, $iRows, $iColumns)
If $iRval = $SQLITE_OK Then
   _SQLite_Display2DResult($aResult)

Else
   MsgBox(16, "SQLite Error: " & $iRval, _SQLite_ErrMsg())
EndIf

_SQLite_Close()
_SQLite_Shutdown()

trying to pull cookie data from firefox's cookie.sqlite and having no luck at all

Edited by RedneckTech
Link to comment
Share on other sites

No, your query is good. Not efficient but it's good.

For one, you're not using the handle from _SQLite_Open. UDFs do not behave the same as built-in functions in that respect. So:

Local $hDB = _SQLite_Open("C:UsersUSERNAMEAppDataRoamingMozillaFirefoxProfilesMUMBOJUMBO.defaultcookies.sqlite")
$iRval = _SQLite_GetTable2d($hDB, "SELECT * FROM *;", $aResult, $iRows, $iColumns)

Try that.

And maybe this Python script could be helpful as well for your query extract cookies.sqlite.

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Link to comment
Share on other sites

Mmh, maybe I was a bit hasty, been a while since I dabbled in SQL... I believe there are no wildcards allowed in the FROM clause. Change that to moz_cookies and try again.

"SELECT * FROM moz_cookies;"

Well using wildcard * in your query means get everything, in this case the entire table. If that's what you want then ok. But usually you only want a few columns from a single row to work with.

"SELECT host, path, isSecure, expiry, name, value FROM moz_cookies" ; will return all specified columns from all rows.
"SELECT isSecure FROM moz_cookies" ; will only return the isSecure column from all rows.
"SELECT name, value FROM moz_cookies WHERE name = 'dany' LIMIT 1" ; Get the value for where name is dany and return only one row.

[center]Spiderskank Spiderskank[/center]GetOpt Parse command line options UDF | AU3Text Program internationalization UDF | Identicon visual hash UDF

Link to comment
Share on other sites

well now the script looks like this.

#include <SQLite.au3>
#include <SQLite.dll.au3>
#include <array.au3>

Local $aResult, $iRows, $iColumns, $iRval

_SQLite_Startup()

Local $hDB = _SQLite_Open("C:UsersBFNetsAppDataRoamingMozillaFirefoxProfilese39tidrb.defaultcookies.sqlite")

$iRval = _SQLite_GetTable2d($hDB, "SELECT * FROM moz_cookies;", $aResult, $iRows, $iColumns)
_SQLite_Display2DResult($aResult)

_SQLite_Close()
_SQLite_Shutdown()

if i Run(x64) it tries to run, but if i run regular it just blips out quick. Would I need to run _arraydisplay? i assume that _SQLite_Display2DResult would do that...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...