jablonka.czprosek.czf

switches

Subversion Repositories:
[/] [macinfo.cgi] - Blame information for rev 16

 

Line No. Rev Author Line
11simandl#!/usr/bin/perl
2#
32simandl# Petr Simandl, www.simandl.cz
4 
51simandl$adresa = "$ENV{'REMOTE_ADDR'}";
6$domena = "$ENV{'REMOTE_HOST'}";
7$parametr = "$ENV{'QUERY_STRING'}";
8$page = "$ENV{'HTTP_REFERER'}";
9$agent = "$ENV{'HTTP_USER_AGENT'}";
10 
11@pairs = split(/&/, $parametr);
12$parametr = $pairs[0];
13 
14print "Content-type: text/html\n\n";
15 
16$mac = $parametr;
17#print $mac;
18#$mac = "00:0E:2E:8A:7C:C3";
19 
20if ($mac =~ /^[0-9a-fA-F][0-9a-fA-F]\:[0-9a-fA-F][0-9a-fA-F]\:[0-9a-fA-F][0-9a-fA-F]\:[0-9a-fA-F][0-9a-fA-F]\:[0-9a-fA-F][0-9a-fA-F]\:[0-9a-fA-F][0-9a-fA-F]$/)
21{
22 for ($i = 23; $i < 24; $i=$i+1)
23 {
24 $arpn = `wget http://10.33.0.$i/cgi-bin/arpn.cgi -T 1 -q -O - | grep -i $mac`;
25 print "$arpn";
26 }
27}

Powered by WebSVN 2.2.1