Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Source] Viewing Firefox 33.#.# browser history & entered form data

so here is the scoop.
view FF history
view FF entered form data

my setup:
FF 33.1.1
Win 7 x86

[Image: mrUWtaF.png]

you first need this class, not mine, credits were left as is.

Code
pastebin, due to message too long
http://pastebin.com/LiABqXH0

ok, add all that to your project then we will start with the form
kk, just add a listview, set it to: view mode = details
add 2 columns, "url" and "title". dock in parent container.

like such:
[Image: AfpDyQa.png]

k done. next code.

first we need to find FF's profile directory and locate the "places.sqlite" file.
so...
Code
Dim FFpath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Mozilla\Firefox\Profiles\"
      If IO.Directory.Exists(FFpath) Then
kk, check if the dir exists and move on k.
Code
For Each fldr As String In IO.Directory.GetDirectories(FFpath)
      If IO.File.Exists(fldr & "\places.sqlite") Then
      Dim historyFile As String = fldr & "\places.sqlite"

right, so now we loop through each directory in the profiles directory to find the file(places.sqlite) we want.

Code
Dim sqlReader As New SQLiteHandler(historyFile)

we have found the file that we need so now lets setup a new sqlite reader for it.

Code
If sqlReader.ReadTable("moz_places") Then
      Try
      For i As Integer = 0 To sqlReader.GetRowCount - 1
      If sqlReader.GetValue(i, 1).ToLower.StartsWith("ht") Then

read the table moz_places because this contains all the info we need.
now irritate through the rows to get each individual entry.
i used a generic check here to see if it was a url because i was ending up with some other garbage mixed in there along with the data i needed.

Code
Dim v As New ListViewItem
      With v
      .Text = sqlReader.GetValue(i, 1)
      .SubItems.Add(sqlReader.GetValue(i, 2))
      ListView1.Items.Insert(0, v)
      End With

right so, here we just make the listview item and insert it at index 0. i did this because the last history entry was at the bottom. its just my shitty way of reversing the list. (think newest first)
oh, and, getvalue(i #) where #1 is the url, and #2 is the page title. there are more numbers (up to 7 i think) like number of visits, last visit timestamp, other bs. that i dont care about.

Code
End If
      Next
      Catch ex As Exception
      End Try
      End If
      End If
      Next
      End If

now lets close up everything. i threw away all the errors because. fuck you that why.

kk, so now just debug your app and if everything is correct wait about 8 - 10 seconds and it should look like this:

[Image: 8FS2hRS.png]

if you run into an error on the first run about
Quote:No supported Schema layer file-format

just comment out this block in the sqlitehandler file
Code
'If db_bytes(52) <> 0 Then
      '    Throw New Exception("Auto-vacuum capable database is not supported")
      '    End
      'ElseIf ConvertToInteger(44, 4) >= 4 Then
      '    Throw New Exception("No supported Schema layer file-format")
      '    End
      'End If

right on

Code
Private Sub ListView1_DoubleClick(sender As Object, e As EventArgs) Handles ListView1.DoubleClick
      If ListView1.SelectedItems.Count = 1 Then
      ListView1.SelectedItems(0).BackColor = Color.LightBlue
      Process.Start(ListView1.SelectedItems(0).Text)
      End If
    End Sub

I added another sub in there to handle visiting of the urls, its simply using the double click event of the listview. all i do here is check if there is something selected, if so, change the back color and start the url.

all that being said here is the full code:
Code
Public Class Form1
    'moz_formhistory
    'formhistory.sqlite
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      Dim FFpath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Mozilla\Firefox\Profiles\"
      If IO.Directory.Exists(FFpath) Then
      For Each fldr As String In IO.Directory.GetDirectories(FFpath)
      If IO.File.Exists(fldr & "\formhistory.sqlite") Then
      Dim historyFile As String = fldr & "\formhistory.sqlite"
      Dim sqlReader As New SQLiteHandler(historyFile)
      If sqlReader.ReadTable("moz_formhistory") Then
      Try
      For i As Integer = 0 To sqlReader.GetRowCount - 1
      If sqlReader.GetValue(i, 1).ToLower.StartsWith("ht") Then
      Dim v As New ListViewItem
      With v
      .Text = sqlReader.GetValue(i, 1)
      .SubItems.Add(sqlReader.GetValue(i, 2))
      ListView1.Items.Insert(0, v)
      End With
      End If
      Next
      Catch ex As Exception
      End Try
      End If
      End If
      Next
      End If
    End Sub

    Private Sub ListView1_DoubleClick(sender As Object, e As EventArgs) Handles ListView1.DoubleClick
      If ListView1.SelectedItems.Count = 1 Then
      ListView1.SelectedItems(0).BackColor = Color.LightBlue
      Process.Start(ListView1.SelectedItems(0).Text)
      End If
    End Sub
End Class

kk.
now.
next up is the form data.
for those that dont understand what this is, i will give a quick explanation.
when you start typing in a box online and it gives you the opportunity to select something you have already entered, thats the form data.

so lets go get that.

keep all the same code, lets just change a few things.
the file we need is not places.sqlite.
no, we need formhistory.sqlite.
got it?

next we need a new table name
rather than moz_places.
we need moz_formhistory
easy easy
we can keep the getvalue(i #), #'s being 1 and 2
as with the history, there are other values that can be used here, but these are going to suit us for now.
also remove the IF block to check if its a url

you should get something like this:

[Image: mAJSPCh.png]

thats it.
there are more tables and values that you can search for and stuff. pwds are stored in logins.json but are encrypted so i didnt even bother adding anything about it.

enjoy.
if you have any problems, deal with it on your own.

**edited for minor tyops
why don't you just wrap everything in a class that returns a IEnumerable<string[]> w/ the listview columns or something? o-o;;

no need to say: copy this, now copy that, now copy dis too, fuk u debug that
slowly becoming less active, contact me on-site before dealing.
Nice job, smashing this in a class and return an array would make people's life easier.

Spoiler (Click to View)
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..
^^ dictionary ! and its called ff stealer https://www.google.com/#q=vb+net+firefox+stealer
njq8 i will call him
to Teach you about coding :)
(Feb 3, 2015 12:45 PM)xVipX Wrote:  njq8 i will call him
to Teach you about coding :)

😊 https://hackforums.net/member.php?action...uid=234681


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by TyrannusSep 19, 2017 06:58 PM 1 129 Sep 19, 2017 06:58 PM
Last Post: Riԁdle
[C#] by Andersen.Jun 24, 2017 09:28 AM 1 110 Jun 24, 2017 09:28 AM
Last Post: TCP
[C] by Andersen.Jun 24, 2017 08:42 AM 0 87 Jun 24, 2017 08:42 AM
Last Post: Andersen.