Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User IE History Script??? 1

Status
Not open for further replies.

00071491

IS-IT--Management
Feb 24, 2004
38
US
Hi,

I dont know much about scripts or really understand the syntax for that matter, but is there anyway that I can use a script to monitor my users' IE history? I'm a tech in a area learning center, that is in a seperate building as the High School/MS/Elem and they have full control over filtering options/firewall....that sort of thing. I am on the same network as them, but manage my NAT'd network sepereate from the HS/MS/Elem. Using win2k serv, how can i monitor which sites my user's visit using IE (history) in one centralized location or a text file/report with date/time info?

Would a certain kind of script do something like that, or is there an easier way?
 
Can't you get access to the Proxy logs?

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
markdmac,

No, the HS/MS/Elem Tech Coord's only have access to the Proxy, SmartFilter App, etc. I would ask them to get me the info from the SmartFilter, but we are on 1 NAT'd IP address via Wireless across town. Everything would be so much easier if they would let me have access to some of this stuff.

It should be a simple task. The teachers ask me to check what sites the students have visited during a certain time frame, but I dont want to have to go around to every machine and log in as that user and check the IE history. I show them what porn and crap the students have went to, bada-bing, their account gets disabled.

Thanks though. Any other thoughts to this?
 
Found something better and FREE. Save the following to an HTM file and double click it. Works like a charm!

<HTML><HEAD><TITLE>IE Spy - by Vengy</TITLE></HEAD><pre>

<script language="VBScript" TYPE="text/vbscript">

' ======================== Let The Games Begin! ========================
' Contact Info
' ------------
' Author: Vengy
' Email : cyber_flash@hotmail.com

' How it works
' ------------
' INDEX.DAT files keep a list of websites you have visited, cookies received and files opened/downloaded.
' As a result anyone can find out what you have been doing on the Internet!
'
' This program scans all history index files looking for any HTTP:// or FILE:// entries.
' If found, they're stored in a file called C:\SPY.HTM along with the user.

' Aside: This program invokes a local windows program called FIND.EXE to
' parse the index.dat files. (I was too lazy to code it myself. ;)

' Have Fun! (-_-)


' ======================== The Banner ========================
document.writeln "INDEX.DAT files keep a list of websites you have visited, cookies received and files opened/downloaded."
document.writeln "As a result anyone can find out what you have been doing on the Internet!"+VBNewLine
document.writeln "This program scans all history index files looking for any HTTP:// or FILE:// entries."
document.writeln "If found, the User/URL's are stored in a file called C:\SPY.HTM."+VBNewLine


' ======================== ActiveX Warning ========================
MsgBox "NOTE: Please click 'Yes' if prompted with the following message:"+VBNewLine+VBNewLine+"An ActiveX control on this page might be unsafe to"+VBNewLine+"interact with other parts of the page. Do you want to"+VBNewLine+"allow this interaction?"+VBNewLine+VBNewLine+"Click OK to start Spy scan ...",vbOKOnly,"Welcome"


' ======================== Setup Objects ========================
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim arrFiles : arrFiles=Array()
Dim oWShell : Set oWShell = CreateObject("WScript.Shell")


' ======================== Locate Index.Dat Folder ========================
' ---> WINXP/2K
If oFSO.FolderExists("C:\Documents and Settings\") Then
index_folder = "C:\Documents and Settings"
' ---> WIN9X
Elseif oFSO.FolderExists("C:\windows\") Then
index_folder = "C:\windows"
' ---> Browse For Folder
Else
index_folder = fnGetMyPathVB
End If


' ======================== Start Spy Scan ========================
If index_folder="None" Then
MsgBox "No Specified Folder. Scan Aborted."
Else
Set oStartDir = oFSO.GetFolder(index_folder)
sFileRegExPattern = "\index.dat$"
RecurseFilesAndFolders oStartDir, sFileRegExPattern
DisplayResults
End If


' ======================== Find ALL Index.Dat Files ========================
Sub RecurseFilesAndFolders(oRoot, sFileEval)
Dim oSubFolder, oFile, oRegExp
Set oRegExp = New RegExp
oRegExp.IgnoreCase = True

window.status="Scanning: "+oRoot

If Not (sFileEval = "") Then
oRegExp.Pattern = sFileEval
For Each oFile in oRoot.Files
If (oRegExp.Test(oFile.Name)) Then
If (InStr(oFile.Path,"History.IE")<>0) Then
ReDim Preserve arrFiles(UBound(arrFiles) + 1)
arrFiles(UBound(arrFiles)) = oFile.Path
End If
End If
Next
End If

For Each oSubFolder In oRoot.SubFolders
RecurseFilesAndFolders oSubFolder, sFileEval
Next
End Sub


' ======================== Display Results ========================
Sub DisplayResults()

Dim sReadLine, sArray, start, count,ub
Const ForReading = 1

Window.status="Scanning ..."

Set oTextStream = oFSO.CreateTextFile("C:\spy.bat")
oTextStream.Write "echo off"+VBNewLine

count=0
ub=UBound(arrFiles)
For Each elem In arrFiles
count=count+1
document.writeln elem
oTextStream.Write "echo Remaining Scans: "+CStr(ub+1-count)+VBNewLine
oTextStream.Write "find "+chr(34)+" "+chr(34)+elem+chr(34)+" >>c:\spy.txt"+VBNewLine
oTextStream.Write "find "+chr(34)+"file://"+chr(34)+" "+chr(34)+elem+chr(34)+" >>c:\spy.txt"+VBNewLine
Next

oTextStream.Close

If count=0 Then
Window.status="Aborted."
MsgBox "No Index.dat files found. Scan Aborted."
Exit Sub
End If

oWShell.Run "c:\spy.bat", , True

oFSO.DeleteFile "C:\spy.bat"

If oFSO.FileExists("C:\spy.htm") Then
oFSO.DeleteFile "C:\spy.htm"
End If

Set oTextStream = oFSO.CreateTextFile("C:\spy.htm")
Set oFilein = oFSO.OpenTextFile("c:\spy.txt",ForReading)

oTextStream.Writeline "<html><title>IE is spying on you!</title><body><b>Welcome</b><br><font size=2>"

Do While Not oFilein.AtEndOfStream
sReadLine = oFilein.ReadLine
start = Instr(sReadLine,": ")
If start <> 0 Then
sReadLine = Mid(sReadLine,start+2)
sArray = Split(sReadLine,"@")
oTextStream.Write sArray(0) ' User
oTextStream.Writeline " <a href="+sArray(1)+">"+sArray(1)+"</a><br>" ' Visited URL
End If
loop

oTextStream.Writeline "</font><b>End of Report</b></body></html>"

oFilein.Close
oTextStream.Close

oFSO.DeleteFile "C:\spy.txt"

Window.status="Done"
document.writeln "<b>Scan Completed.</b>"
MsgBox "Please check C:\SPY.HTM for details. Thanks!",0,"Spy Scan Completed."
oWShell.Run "C:\PROGRA~1\INTERN~1\IEXPLORE.EXE C:\SPY.HTM"

End Sub


' ======================== Specify Custom Index.dat Folder ========================
function fnGetMyPathVB()
dim oShell
dim oFolder
dim oFolderItem

set oShell = CreateObject("Shell.Application")
set oFolder = oShell.BrowseForFolder(0, "Choose a Folder", 0)

If oFolder is nothing Then
fnGetMyPathVB = "None"
Else
set oFolderItem = oFolder.Items.Item
fnGetMyPathVB = oFolderItem.Path
End If
end function


' ======================== End Of VBscript ========================
</script>

</pre></HTML>

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Mark,

That ROCKS!!!! Thank you!!!! Now, is it possible to run this from my server (where i sit) to gather the info from the other users' workstations in my doman?
 
And/or Date and Time info????? I wouldn't need the Date/time, but the users have roaming profiles and it's hard to keep track of what computers they are on all of time. Or is there a way to add a string into that script to display the date/time info?

Thank you very much for what you have posted so far!!!

Gunna Help out a lot!
 
Not sure about adding the date. Since I didn't write the script I am unsure.

looks like you would want to edit the line
oTextStream.Writeline " <a href="+sArray(1)+">"+sArray(1)+"</a><br>" ' Visited URL

But I don't know how you could extract te date info from the collection.

Sorry I can't be of more help.


I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top