#!/usr/bin/perl # Magic Packet for the Web # Perl version by ken.yap@acm.org after DOS/Windows C version posted by # Steve_Marfisi@3com.com on the Netboot mailing list # modified to work with web by guenter.knauf@dialup.soco.de # Released under GNU Public License # require "cgi-lib.pl"; use Socket; $ver = 'v0.32 © gk 2000-05-20 15:00:00'; # Defaults - Modify to point to the location of your maclist $www = "$ENV{'DOCUMENT_ROOT'}/perldemo"; $maclist = "$www/wakeup.txt"; #$scrname = $ENV{'SCRIPT_NAME'}; $scrname = $0; MAIN: { # Read in all the variables set by the form if (&ReadParse(*input)) { &ProcessForm; } else { &PrintForm; } } sub ProcessForm { # Print the header print &PrintHeader; # If defined new mac save it if (defined($input{'mac'})) { print &HtmlTop ("Result of adding an entry to the maclist"); print '