On Wed, 7 Sep 2005, Tim Wolak wrote: > Rightly so but I have a big script for removing entries in the > registry and the files the virus inserts so I'd like to do it with the > script to get it done in one pass.
Okay, but it still seems like overkill to me. If you have a known-good hosts file, and the one that your computer is using differs from it, then just clobber the broken one and restore from your known-good backup. use File::Compare; use File::Copy; my $hosts_std = "/etc/hosts.canonical"; my $hosts_live = "/etc/hosts"; if ( compare( $hosts_std, $host_live ) != 0 ) { # the files are not identical copy( $hosts_std, $hosts_live ); } You may have to adapt the file paths for Windows -- it buries the hosts file somewhere under %SYSTEMROOT% -- but the gist of the code should be the same either way. -- Chris Devers \nYTí¦×RÍ^
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>