fix for ipcop 1.4.15 RedMAC addon

RedMAC doesn't work with ipcop 1.4.15. After installing addons,
redmac package and rebooting, redmac still says it needs to reboot.
It is stuck. You can patch redmac.cgi with code below and change your
MAC right away and then reboot to get new red interface MAC setup.

This fix is for RedMAC-1.0-GUI-b1.tar.gz insert into /home/httpd/cgi-
bin/redmac.cgi right after line 44:
&Header::openpage($Lang::tr{'redmac'}, 1, '');



#
------------------------------------------------------------ -----------------------------
# redmac fix - bl8n8r 06/10/2007 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#
my $reddev=`grep RED_DEV= ${General::swroot}/ethernet/settings | sed
's#RED_DEV=##g'`;
chomp ($reddev);

my $redmac=`ifconfig eth1 | grep HWaddr | awk '{print $5};'`;
chomp ($redmac);

# is redmac/originalmac empty or crap in file?
my $hwmac=`cat ${General::swroot}/redmac/originalmac | grep ':'`;
chomp ($hwmac);

if ( length($hwmac) < 4)
{
print "<font color=red>didnt find any colons in ${General::swroot}/
redmac/originalmac so adding current mac from RED_DEV $reddev</
font><br>\n";
open (FO, ">${General::swroot}/redmac/originalmac") || die ("unable
to open ${General::swroot}/redmac/originalmac");
printf (FO "%s\n", $redmac);
close (FO);
}
#
# redmac fix - bl8n8r 06/10/2007 ^^^^^^^^^^^^^^^^^^^^
bl8n8r [ So, 10 Juni 2007 22:09 ] [ ID #1734711 ]
Miscellaneous » comp.security.firewalls » fix for ipcop 1.4.15 RedMAC addon

Vorheriges Thema: Security Risks of Firewire and PCMCIA DMA
Nächstes Thema: Continious hacks- McAfee