CJJ
Posts: 9
Joined: 22.Aug.2008
Status: offline
|
I have been trying to get the script ISA_Fill_Domain_Name_Set.vbs to work from ISAscripts.org but cant figure out where you define the paremeters for domainnameset and filename.txt. I have tried several places as well as using the set parameter but with my knowlege of vb very little I have been unsuccesful and need some help figuring this out. Here is the top half of the script where I believe is the portion where you define these paremeters. '************************************************************************************* ' Script Name: ISA_Fill_Domain_Name_Set.vbs ' Version: 1.2 ' Author: Jason Fossen ( www.ISAscripts.org ) ' Last Updated: 18.Feb.2008 ' Purpose: Automatically update an ISA Server Domain Name Set with domains; for example, ' these could be domains of spammers, pornographers, hacking sites, etc. ' Arguments: First arg is name of Domain Name Set, in double-quotes if necessary. The ' second arg is the HTTP URL, local full path, or file name (if in same ' folder as script) of a text file containing the domain data. This file, ' if it contains comments, must use #-marks or semicolons to denote comments. ' Each line must be just a domain name, but if IP addresses are in the list, they ' will be ignored automatically. This script is compatible with, but does not ' require or depend on, the lists at: ' http://urlblacklist.com ' http://www.squidguard.org/blacklists/ ' It also works if a listed domain begins or ends with a period, or begins ' with "*." as a wildcard. The file with the domains can use either ' Windows-style or UNIX-style newlines, it's compatible with both. Note that ' each domain will be added twice: once with a prepended "*." and another ' without the leading "*." wildcard, since ISA won't match on just the plain ' domain name in a URL if the domain has "*." prepended to it in the set. ' Note: Depending on the speed of the ISA box, importing a 10MB file with 500,000 ' domains can take between two and four hours. This is a bottleneck imposed ' by ISA, not the Windows Script Host or VBScript. Hence, schedule your ' imports during off-peak hours and run the script with the Start command ' to launch it with a lower multi-tasking priority; for example, like this: ' "start /belownormal cscript.exe ImportBlacklist.vbs Bad-Sites domains" ' Note: The fastest way to see that the Domain Name Set had been filled correctly ' is to close and open the ISA MMC console again, not by refreshing. ' Works on both ISA Standard and Enterprise. ' Legal: Public Domain. Modify and redistribute freely. No rights reserved. ' SCRIPT PROVIDED "AS IS" WITHOUT WARRANTIES OR GUARANTEES OF ANY KIND. ' USE AT YOUR OWN RISK. Test on non-production servers first! '************************************************************************************* Option Explicit On Error Resume Next ReDim aDomainsArray(0) 'Array of Domains to be added to the Domain Name Set. Dim sDomainNameSetName 'Name of Domain Name Set to be created and/or updated. Dim bUseLocalDomainsFile 'If true, use local file. If false, get domains from http URL. Dim sDomainsFilePath 'An HTTP URL or a local filesystem path to a file of domains. Dim oFPC 'See MakeIsaObjects() Dim oIsaArray 'See MakeIsaObjects() Dim oFileSystem : Set oFileSystem = WScript.CreateObject("Scripting.FileSystemObject") Call CatchAnyErrorsAndQuit("Problems creating the FileSystemObject.") '************************************************************************************* ' Main() '************************************************************************************* Call ProcessCommandLineArguments() Call CreateIsaObjects() Call MakeArrayOfDomains() Call CreateDomainNameSet() Call EmptyTheDomainNameSet() Call CreateNewDomains() '************************************************************************************* ' Procedures '************************************************************************************* Sub ProcessCommandLineArguments() On Error Resume Next ' ' First arg... ' sDomainNameSetName = WScript.Arguments.Item(0) Dim sArg : sArg = LCase(sDomainNameSetName) If (WScript.Arguments.Count = 0) Or (WScript.Arguments.Count => 3) Or (sArg = "/?")_ Or (sArg = "-?") Or (sArg = "/h") Or (sArg = "/help") Or (sArg = "--help") Then Call ShowHelpAndQuit() End If ' ' Second arg... ' sDomainsFilePath = WScript.Arguments.Item(1) If InStr(LCase(sDomainsFilePath), "http://") = 0 Then bUseLocalDomainsFile = True 'Use a local text file. Else bUseLocalDomainsFile = False 'Use an http URL. End If On Error Goto 0 End Sub Sub CreateIsaObjects() 'This sub is just a placeholder for something to add later on... Set oFPC = CreateObject("FPC.Root") Set oIsaArray = oFPC.GetContainingArray Call CatchAnyErrorsAndQuit("Problems connecting to ISA Server or ISA Array.") End Sub
< Message edited by CJJ -- 28.Aug.2008 9:16:49 AM >
|