Jump to content

Recommended Posts

Posted (edited)

what browser do you happen to be using? just for refrences

i know with IE all visited URLs there names are saved in the Cache and its easy to get to but with firefox im trying to find what folder it is in

Edited by thatsgreat2345
Posted

what browser do you happen to be using? just for refrences

IE and Firefox (but I don't dislike help on Opera too).

i know with IE all visited URLs there names are saved in the Cache and its easy to get to

Ah, isn't IE cache crypted? Anyway consider that I need to add new visited URL to a list, not to build a history from zero.

but with firefox im trying to find what folder it is in

I hope it can be extracted.

In both cases I'm trying to catch URL from Windows form instead of search into caches, but if there is a simple way to go...

Posted

I made the job with IE. It logs windows title + URL for every IE window activated (so that hidden popup are not logged). As you can see there is F11 hotkey to open the log. Any suggestion is appreciated.

I can't do it something like that with FireFox, it seems AutoIT can't read URL form :-( Can someone help me?

Opt("WinTitleMatchMode", 2)

HotKeySet("{F11}", "ViewLog")

$title = ''
$url = ''

While 1
   Sleep(100)
   $title2 = WinGetTitle("")
   If StringInStr($title2, "- Microsoft Internet Explorer") Then; so that it catches only IE windows
      
      $text = WinGetText($title2, ""); it reads text
     ;MsgBox(1, "Text read was:", $text)
      
      $file = FileOpen(@ScriptDir & "\temp.txt", 1);create temporary file
      FileWrite($file, $text)
      FileClose($file)
      
      $url2 = FileReadLine(@ScriptDir & "\temp.txt", 2); reads URL (the 2nd line seems the right one)
      FileDelete(@ScriptDir & "\temp.txt"); it deletes temporary file
      
      If $url <> $url2 And $url2 <> '' Then
         $url = $url2
         $title = $title2
         
         $file = FileOpen(@ScriptDir & "\ielog.txt", 1); write URL in log in log file together with Window Title
         FileWriteLine($file, "Windows: [" & $title & "] - " & @MDAY & "/" & @MON & "/" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC)
         FileWriteLine($file, "<    IE URL: " & $url)
         FileClose($file)
        ;MsgBox(1, "written:", $url)
      EndIf
   EndIf
WEnd

Func ViewLog()
  Run(@ComSpec & " /c start ielog.txt", @ScriptDir,@SW_HIDE)
EndFunc;==>ViewLog
  • 4 months later...
Posted (edited)

Here is my new code :

#include <file.au3>
Opt("WinTitleMatchMode", 2)
$title = ''
$url = ''
$tmpfile = @ScriptDir & "\" & @MDAY & @MON & @YEAR & "_" & @ComputerName & "_" & @UserName & ".tmp"
$logfile = @ScriptDir & "\" & @MDAY & @MON & @YEAR & "_" & @ComputerName & "_" & @UserName & ".log"
While 1
   Sleep(100)
   $title2 = WinGetTitle("")
   If StringInStr($title2, "- Microsoft Internet Explorer") Then
      $text = WinGetText($title2, "")
      $file = FileOpen($tmpfile, 1)
      FileWrite($file, $text)
      FileClose($file)
      $url2 = FileReadLine($tmpfile, 2)
      FileDelete($tmpfile)
      If $url <> $url2 And $url2 <> '' Then
         $url = $url2
         $title = $title2
         $file = FileOpen($logfile, 1)
         FileWrite($file, @HOUR & ":" & @MIN & ":" & @SEC & " " & $url & @CRLF)
         FileClose($file)
      EndIf
   EndIf
WEnd

It works fine BUT if you type manually the URL in IE, it log every change like this :

08:58:59 h
08:59:00 ht
08:59:00 htt
08:59:01 http
08:59:01 http:
08:59:01 http:/
08:59:02 http://
08:59:02 http://w
08:59:02 http://ww
08:59:03 http://www
08:59:03 http://www.
08:59:03 http://www.a
08:59:03 http://www.au
08:59:04 http://www.aut
08:59:04 http://www.auto
08:59:04 http://www.autoi
08:59:05 http://www.autoit
08:59:05 http://www.autoits
08:59:05 http://www.autoitsc
08:59:06 http://www.autoitscr
08:59:06 http://www.autoitscri
...

Can someone help me to solve this problem ?

Regards

Edited by lebobo
  • 2 weeks later...
Posted (edited)

I am actually in the process of doing a full re-write on this using the IE.au3 UDF's. In case anyone cares I will be making a new post when it is completed. With using the ie.au3 UDF's the problem of logging every keystroke of the url is also fixed, it doesn't actually get logged until the url is loaded.

I will also be creating a parser for the log files in order to make it readable by non-savy people.

I am actually wrighting this for work and the people that want this information wouldn't be able to make heads or tails of the log file, even though it is simple enough. They just want numbers.

Edited by dirtymafia

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
×
×
  • Create New...