WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

SQLite

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

List FireFox Bookmarks

 Keywords: SQLITE SQLLITE List FireFox Bookmarks places.sqlite 

; List FireFox bookmarks
; REQUIRED: SQLLite Download - http://www.ch-werner.de/sqliteodbc/
; Reference: http://www.forensicswiki.org/index.php?title=Mozilla_Firefox_3_History_File_Format

user = Environment('USERNAME')
bookmarkpath = 'C:\Documents and Settings\':user:'\Application Data\Mozilla\Firefox\Profiles\k4efrg23.default\'
bookmarkfilename = 'places.sqlite'
cOut = 'd:\temp\ffbookmarks.txt'

If !FileExist( bookmarkpath:bookmarkfilename )
   Pause('Notice','File does not exist')
   Exit
EndIf

;create an ADO connection and query
cConn= 'DRIVER=SQLite3 ODBC Driver;Database=':bookmarkfilename:';LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;'
oConn=CreateObject("ADODB.Connection")
oConn.Open(cConn)
oRS=CreateObject("ADODB.Recordset")

;The places.sqlite includes a number of tables as follows:
;
;moz_anno_attributes - Annotation Attributes
;moz_annos - Annotations
;moz_bookmarks - Bookmarks
;moz_bookmarks_roots - Bookmark roots i.e. places, menu, toolbar, tags, unfiled
;moz_favicons - Favourite icons - including URL of icon
;moz_historyvisits - A history of the number of times a site has been visited
;moz_inputhistory - A history of URLS typed by the user
;moz_items_annos - Item annotations
;moz_keywords - Keywords
;moz_places - Places/Sites visited - referenced by moz_historyvisits


cSQL="SELECT moz_bookmarks.title,moz_places.url FROM moz_bookmarks LEFT JOIN moz_places WHERE moz_bookmarks.fk = moz_places.id AND moz_bookmarks.title != 'null';"


oRS.Open(cSQL,oConn,1,3,1)
If ! oRS.eof
   FilePut(cOut,oRS.GetString(2,,,@CRLF,))
Else
   Pause("Notice","Table is Empty")
EndIf
oRS.Close()
oRS=0
oConn.Close()
oConn=0
If FileExist(cOut)
   Run("notepad.exe", cOut)
Else
   BoxText("Error: File Could Not Be Created")
EndIf


Article ID:   W18196
Filename:   List FireFox Bookmarks.txt
File Created: 2011:06:07:13:29:36
Last Updated: 2011:06:07:13:29:36