use warnings;
# WARNING: CHANGE THIS! :-P
-my $year = 2006;
+my $year = 2007;
my %months = (
Jan => 1,
if (!defined($dbh) || !$dbh->ping) {
$dbh = nms::db_connect();
- $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE inet ? << network AND ( last_ack < ? OR last_ack IS NULL )")
+ $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE ?::inet << network AND ( last_ack < ? OR last_ack IS NULL )")
or die "Couldn't prepare query";
}
}
my $vlan = "$row$switch";
+ my $ipv6 = sprintf "F%02u%u", $row, $switch;
$distros{$distro} .= <<"EOF";
vlan $vlan
ip helper-address 87.76.254.2
no ip proxy-arp
ip access-group great-wall-of-tg in
- ipv6 address 2001:16D8:FFFF:$vlan::1/64
+ ipv6 address 2001:16D8:FFFF:${ipv6}::1/64
+ ip igmp version 3
no shutdown
!
spanning-tree portfast
spanning-tree bpduguard enable
- ip igmp snooping
storm-control broadcast level 2
no shutdown
!
return $bits;
}
+open LOG, ">>", "mbd.log";
+
my @ports = mbd::find_all_ports();
# Open a socket for each port
last;
}
+ print LOG "$dport $size $pass\n";
+
if (!$pass) {
print "$dport, $size bytes => filtered\n";
}
my $dbh = nms::db_connect();
GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
my $blk = $img->colorResolve(0, 0, 0);
-$img->string(gdMediumBoldFont,0,0,"TG05 - DHCP-lease status",$blk);
+$img->string(gdMediumBoldFont,0,0,"TG07 - DHCP-lease status",$blk);
$img->string(gdSmallFont,0,20,"Last recieved DHCP-request",$blk);
# first 1/5: green (<30 min)
if (!defined($ARGV[0])) {
print $cgi->header(-type=>'image/png',
- -refresh=>'10; http://nms.tg05.gathering.org/dhcpkart.pl');
+ -refresh=>'10; http://nms.tg07.gathering.org/dhcpkart.pl');
}
print $img->png;
$name =~ /e(\d+)-(\d+)/;
my ($e, $s) = ($1, $2);
- my $x = int(202 + $e * 8.25);
+ my $x = int(244 + $e * 9.87);
my $y;
$x += 7 if ($e >= 19);
$c = $e;
$d = ($s - 1) * 64;
- $y = 470 - $s * 48;
+ $y = 455 - $s * 48;
} else {
$c = $e + 1;
$d = ($s - 4) * 64;
- $y = 400 - $s * 48 - ($s - 3) * 2;
+ $y = 424 - $s * 48 - ($s - 3) * 2;
}
my $xx = $x + 12;
my $cgi = CGI->new;
my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg05.gathering.org/nettkart-telnet.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg07.gathering.org/nettkart-telnet.pl');
print <<"EOF";
<html>
my $cgi = CGI->new;
my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'10; http://nms.tg05.gathering.org/nettkart-text.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'10; http://nms.tg07.gathering.org/nettkart-text.pl');
print <<"EOF";
<html>
my $cgi = CGI->new;
my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg05.gathering.org/nettkart-web.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg07.gathering.org/nettkart-web.pl');
print <<"EOF";
<html>
my $dbh = nms::db_connect();
GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
my $blk = $img->colorResolve(0, 0, 0);
}
-print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg05.gathering.org/overlay.pl?cam=' . $cam);
+print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg07.gathering.org/overlay.pl?cam=' . $cam);
print $gd->png;
sub get_color {
my $dbh = nms::db_connect();
GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
my $blk = $img->colorResolve(0, 0, 0);
$ua->timeout(15);
$ua->agent('Mozilla/5.0');
-#$ua->credentials( "http://zepo.tg05.gathering.org", "/", $uname, $pass );
+#$ua->credentials( "http://zepo.tg07.gathering.org", "/", $uname, $pass );
my $content;
my %form;
$form{'userid'} = $uname;
$form{'next'} = "Look me up";
-#my $content = $ua->get("http://zepo.tg05.gathering.org/");
+#my $content = $ua->get("http://zepo.tg07.gathering.org/");
-$content = $ua->post("http://zepo.tg05.gathering.org/login", \%form);
+$content = $ua->post("http://zepo.tg07.gathering.org/login", \%form);
if (!defined($content->{'_headers'}{'location'})) {
die "Could not find dudes";
$form{'password'} = $pass;
$form{'userid'} = 39457;
$form{'next'} = "Log in";
-$content = $ua->post("https://zepo.tg05.gathering.org/enter&got=it", "cookie" => "SID=".$sessioncookie, \%form);
+$content = $ua->post("https://zepo.tg07.gathering.org/enter&got=it", "cookie" => "SID=".$sessioncookie, \%form);
print Dumper($content);
GD::Image->trueColor(1);
-my $img = GD::Image->new('bg2.png');
+my $img = GD::Image->new('bg07.png');
#my $img = GD::Image->new(100,100);
my $cgi = CGI->new;
$img->string(gdMediumBoldFont,0,0,"TG05 - Streaming",$blu);
print $cgi->header(-type=>'image/png',
- -refresh=>'10; http://nms.tg05.gathering.org/streaming.pl');
+ -refresh=>'10; http://nms.tg07.gathering.org/streaming.pl');
print $img->png;