neon Posted February 10, 2010 Posted February 10, 2010 Hey guys have been trying to find a way to monitor internet use (website visited) came across this .vbs on edugeek and thought it looked just what I needed, I cant seem to get it work though I have looked over the script and cant see any errors, would anybody mind casting their eye on it? I have created a hidden network share called \monitor$ trying to get the .htm file into here if possibleinetlogger.vbs
K.C.Leblanc Posted February 10, 2010 Posted February 10, 2010 spyPath = "\\server\monitor$" &strUsername&"\spy.htm" Should be spyPath = "\\server\monitor$\" &strUsername&"\spy.htm"
neon Posted February 10, 2010 Author Posted February 10, 2010 Have changed it, now I get a folder made in my network share called inetAdministrator with nothing in it? I tried deleteing the folder and running the script but get an error on line:161 char:4 error: path not found
Cools Posted February 10, 2010 Posted February 10, 2010 Problem with line 160 chr 9 oFS.CreateFolder(("\\server01\spy$\inet" & strUserName)) can any one help ??
OutToLunch Posted February 10, 2010 Posted February 10, 2010 Same issue - you're missing a backslash and creating a file path of inetUsername instead of a folder inet with a subfile of username.htm
mac_shinobi Posted February 10, 2010 Posted February 10, 2010 Problem with line 160 chr 9 oFS.CreateFolder(("\\server01\spy$\inet" & strUserName)) can any one help ?? [b]strUserName[/b] = objNet.UserName spyPath = "\\server\monitor$" & [b]strUsername[/b] & "\spy.htm" in the path you have used the variable strUsername where as the variable you have done is StrUserName Also I have found in your code that when you are using the ampersands ie & you are not putting spaces between the quote marks etc ie "String here"&variable&"String" Not sure if that works or not but I normally just to make it easier to read put a space in the example below I have put under scores to represent a space so a _ is a space. "String goes here"_&_Variable_&_"Another string" The other thing I would do just for a test purpose to make sure that the FSO can use unc paths and it works with ref to that is to just make a small sample vbs that can create a text file on the unc path and if that works then go from there.
neon Posted February 10, 2010 Author Posted February 10, 2010 Cheers guys, seem to be getting somewhere the .htm file now appears and I can open it open however there is no websites in the links...?
mac_shinobi Posted February 10, 2010 Posted February 10, 2010 (edited) Cheers guys, seem to be getting somewhere the .htm file now appears and I can open it open however there is no websites in the links...? might be wrong but looks like you commented out your write line command 'oTextStream.WriteLine ' +----------------------------------------------------------------------------+ ' | Find Links within Index.dat | ' +----------------------------------------------------------------------------+ Sub FindLinks(strMatchPattern, strPhrase, file) Dim oRE, oMatches, oMatch, dt, start, sArray, timeStamp, url Set oRE = New RegExp oRE.Pattern = strMatchPattern oRE.Global = True oRE.IgnoreCase = False Set oMatches = oRE.Execute(strPhrase) For Each oMatch In oMatches start = Instr(oMatch.FirstIndex + 1,strPhrase,": ") If start <> 0 Then sArray = Split(Mid(strPhrase,start+2),"@") url=Left(sArray(1),InStr(sArray(1),chr(0))) dt=AsciiToHex(Mid(strPhrase,oMatch.FirstIndex+1+16,8)) timeStamp = cvtDate(dt(7)&dt(6)&dt(5)&dt(4),dt(3)&dt(2)&dt(1)&dt(0)) 'oTextStream.WriteLine "" & sArray(0) & " - " & timeStamp & " - " & ""&url&" - " & file & " - " & CStr(oMatch.FirstIndex + 1) & " " 'Visit User + Date + Visited URL if split(timestamp," ")(0) = FormatDateTime(date) then oTextStream.WriteLine ""&objNet.ComputerName&""+" "&timeStamp&""&" "&url&"" end if End If Next End Sub from the above section - not sure if thats where its getting its links from ? if you get it to work can you upload the working version here please ta Edited February 10, 2010 by mac_shinobi
Cools Posted February 10, 2010 Posted February 10, 2010 Just change Line 42 , 160 ,161 to your serverinetlogger.vbs
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now