F-Prot Update Script Available

Julian Field jkf at ecs.soton.ac.uk
Thu Jun 20 09:44:29 IST 2002


Well spotted.
I've fixed in the current distribution and attached a new version to this
message.

At 08:11 20/06/2002, you wrote:
>On Tue, 18 Jun 2002 17:09:45 +0100, Julian Field <jkf at ECS.SOTON.AC.UK>
>wrote:
> >Okay, it's written and is available at
> >http://www.sng.ecs.soton.ac.uk/mailscanner/files/autoupdate.f-prot
> >
>Hi Julian,
>The script seems to contains a few bugs.. :-)
>I just got it down and tried it.  It works but it was getting the file
>from the $FallbackServer.  I notice this when I look at the squid cache log
>file.  There is an entry with URL "GET http://fp-def.zip/".
>
>After carefully looking through the script, seems that
>$Server variable may not be defined anywhere, it should be $server?

I changed $server to $Server instead.

>#####################################
>.
>   # Download it from the server
>   DownloadFile($Server, $FileToCheck);
>.
>sub DownloadFile {
>   my($host, $file) = @_;
>   my($result);
>
>   if ($file =~ /^SIGN/) {
>   .
>     Fetch($host, 'fp-def.zip');
>   .
>   } else {
>   .
>     Fetch($host, 'macrdef2.zip');
>   .
>   }
>}
>
>sub Fetch {
>   my($ip, $filename) = @_;
>   my($r);
>
>   $r = system("wget --passive-ftp --tries=3 $ip$filename > /dev/null 2>&1");
>   if ($r>>8) {
>     # Download failed so try fallback server
>     BailOut("Download from $ip failed, exiting.") if $ip eq $FallbackServer;
>     Fetch($FallbackServer, $filename);
>   }
>}
>
>###### Squid cache log ######
>.... TCP_MISS/200 778 GET http://updates.f-prot.com/cgi-bin/check-updates? -
>  DIRECT/updates.f-prot.com text/plain
>.... TCP_MISS/503 1147 GET http://fp-def.zip/ - DIRECT/fp-def.zip -
>.... TCP_MISS/200 943963 GET http://updates.f-prot.com/files/fp-def.zip -
>DIRECT/updates.f-prot.com application/zip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoupdate
Type: application/octet-stream
Size: 8693 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20020620/4f0dbaae/autoupdate.obj
-------------- next part --------------
--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ


More information about the MailScanner mailing list