Microsoft
Software
Hardware
Network
Question : Automated FTP download through HTTP proxy (for mirroring McAfee DAT site)
I would like to mirror the mcafee ftp dat site (
ftp://ftp.nai.com/pub/ant
ivirus/dat
files/4.x
)
so that the 2000 server (running netshield 4.5) and xp clients (running vshield 4.5.1 sp1) can update themselves without connecting to the net. We are a school and behind several firewalls.
On the server, the autoupdate program will connect, but fails when it gets the the last file. Also, this version can't mirror the ftp site (therefore, not much use for the clients).
The xp client does have a usefull mirror utiltiy, which works through the firewall. However, only works on XP, and i want it all to come from the server.
The answer should be simple: use a scheduled ftp program (e.g. ws_ftp, scriptftp) to connect to
ftp.nai.com
and download the right folder then set the virus scan do update from my server. I've tried all sorts of configuration settings to setup the proxy, but with no luck. It must be possible, because the xp version of mcafee's software can do it. I can also access mcafee's site through internet explorer (but that can't be scripted - can it?).
thanks, ian.
p.s. ideally, the solution is free(!)
Answer : Automated FTP download through HTTP proxy (for mirroring McAfee DAT site)
Since the request is coming from the web proxy, the server delivers the index.html file (like when you access it in a browser).
To work around that, you can retrieve update.ini to check for the current version, then download the superdat and the zipped dat file.
Here's a sample; this will download update.ini, sdatxxxx.exe and dat-xxxx.zip , and put them into the target directory defined at the beginning.
@echo off
setlocal
set TargetPath=D:\Test\Antivir
us
if exist "%TargetPath%\update.ini" del "%TargetPath%\update.ini"
:: *** Retrieve update.ini with version information:
wget
ftp://ftp.nai.com/virusdef
s/4.x/upda
te.ini
-O "%TargetPath%\update.ini"
:: *** Find the version to download:
for /f "tokens=2 delims==" %%a in ('type "%TargetPath%\update.ini" ^| find /i "datversion="') do set DatVersion=%%a
:: *** Download the superdat and the zipped dat files:
wget
ftp://ftp.nai.com/virusdef
s/4.x/sdat
%DatVersio
n%.exe
-O "%TargetPath%\sdat%DatVers
ion%.exe"
wget
ftp://ftp.nai.com/virusdef
s/4.x/dat-
%DatVersio
n%.zip
-O "%TargetPath%\dat-%DatVers
ion%.zip"
Random Solutions
How to restore deleted domain account from tape.
Creating a batch file to print to network printers
Yahoo online chat on linksys router
Virtual FTP sites on Window 2000 Server
Changing external DNS hosts -- am I missing anything?
Private IPv6 addresses
Send email via DoCmd.SendObject , , , "
[email protected]
", , , "Test email", "Ca past 6 days", , True
Process domin login scripts via VPN
Route specific outgoing calls in CallManager Express
Solaris 10 SFTP to get a directory