Use vbs to read index. dat

Source: Internet
Author: User

From vbs small shop s blog

+ ---------------------------------------------------------------------------- +
| Contact Info |
+ ---------------------------------------------------------------------------- +
Author: Vengy
Modiy: lcx
Email: cyber_flash@hotmail.com
Tested: win2K/XP (win9X not tested !)


Option Explicit


+ ---------------------------------------------------------------------------- +
| Setup constants |
+ ---------------------------------------------------------------------------- +
Const conBarSpeed = 80
Const conForcedTimeOut = 3600000 1 hour


+ ---------------------------------------------------------------------------- +
| Setup Objects and misc variables |
+ ---------------------------------------------------------------------------- +
Dim spyPath: spyPath = "c: spy.htm", Please modify it by yourself
Dim oFSO: Set oFSO = CreateObject ("Scripting. FileSystemObject ")
Dim oWShell: Set oWShell = CreateObject ("WScript. Shell ")
Dim objNet: Set objNet = CreateObject ("WScript. Network ")
Dim Env: Set Env = oWShell. Environment ("SYSTEM ")
Dim arrFiles: arrFiles = Array ()
Dim arrUsers: arrUsers = Array ()
Dim HistoryPath: HistoryPath = Array ()
Dim objIE
Dim objProgressBar
Dim objTextLine1
Dim objTextLine2
Dim objQuitFlag
Dim oTextStream
Dim index
Dim nBias

+ ---------------------------------------------------------------------------- +
| Whose been a naughty surfer? Lets find out! ;) |
+ ---------------------------------------------------------------------------- +
StartSpyScan

+ ---------------------------------------------------------------------------- +
| Outta here... |
+ ---------------------------------------------------------------------------- +
CleanupQuit

+ ---------------------------------------------------------------------------- +
| Cleanup and Quit |
+ ---------------------------------------------------------------------------- +
Sub CleanupQuit ()
Set oFSO = Nothing
Set oWShell = Nothing
Set objNet = Nothing
WScript. Quit
End Sub

+ ---------------------------------------------------------------------------- +
| Start Spy Scan |
+ ---------------------------------------------------------------------------- +
Sub StartSpyScan ()
Dim index_folder, history_folder, oSubFolder, oStartDir, sFileRegExPattern, user

LocateHistoryFolder
Index_folder = HistoryPath (0) & "& HistoryPath (1)

If Not oFSO. FolderExists (index_folder) Then
Wsh. echo "No history folder exists. Scan Aborted ."
Else


SetLine1 "Locating history files :"

SFileRegExPattern = "index. dat $"
Set oStartDir = oFSO. GetFolder (index_folder)

For Each oSubFolder In oStartDir. SubFolders
History_folder = oSubFolder. Path & "& HistoryPath (3) &" "& HistoryPath (4) &" & "History. IE5"
If oFSO. FolderExists (history_folder) Then
If IsQuit () = True Then

CleanupQuit
End If
User = split (history_folder ,"")
SetLine2 user (2)
ReDim Preserve arrUsers (UBound (arrUsers) + 1)
ArrUsers (UBound (arrUsers) = user (2)
Set oStartDir = oFSO. GetFolder (history_folder)
RecurseFilesAndFolders oStartDir, sFileRegExPattern
End If
Next

If IsEmpty (index) Then

Wsh. echo "No Index. dat files found. Scan Aborted ."
Else
CreateSpyHtmFile

RunSpyHtmFile

End If

End If
End Sub


+ ---------------------------------------------------------------------------- +
| Locate History Folder & nbs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.