1st... to English via babelfish (sorry, I'm multi-lingual, but all but one of them are computer languages)
Blank to all: in the first place it compliments for the fantastic software from you developed!!! Truly impressive E'... I and the company with which I collaborate extensively install and use firewall and services based on Linux platform, and ntop e' become one of the tool that we propose piu' frequentemtente (my guess: most frequently), for the monitoring on the firewalls netfilter from installed we; one of the functions of ntop that " they make an impression ":) mainly the customer and that one supplied from the cgi-bin mapper.pl, than pero' lately had stopped to work. The problem, that I believed complicated, e' instead rather banal: the situated one multimap.com has changed the format of the URL that generates the map... therefore the sintassi (guess: syntax) of $$URL1 to the inside of mapper.pl becomes: $$URL1 = " http://www.multimap.com/map/gif.cgi? scale=500000&db=ap&overviewmap=ap&lon=".$elem{LONG}."&lat=".$elem { LAT}."&width=320& height=200 "; I know that like rather insufficient contribution e', but I hope that you appreciate:) Good job to all!!! Actually, that's pretty clear... multimap has changed it's url for lookup. The fix is already in the 17Feb2002 source... If you just want to manually edit mapper.pl, I've listed it below... watch out for line truncation/wrapping -----Burton ========================================================================== #!/usr/bin/perl # # Copyright (C) 2001 Luca Deri <[EMAIL PROTECTED]> # # http://www.ntop.org/ # # # Description: # # This is a simple program that returns a GIF about # a host location # # October 2001 # # NOTE # The URL format changed: # http://146.101.249.88/p/browse.cgi?scale=500000&lon=10.40&lat=43.72&width=32 0&height=200 # # February 2002 - URL format change (found by [EMAIL PROTECTED]): # http://www.multimap.com/map/browse.cgi?... # # use LWP::Simple; if($ENV{QUERY_STRING_UNESCAPED} ne "") { # Remove backslashes $ENV{QUERY_STRING_UNESCAPED} =~ s/\\//g; @in = split(/[&;]/,$ENV{QUERY_STRING_UNESCAPED}); } else { @in = split(/[&;]/,$ENV{QUERY_STRING}); } foreach $i (0 .. $#in) { # Convert plus to space $in[$i] =~ s/\+/ /g; # Split into key and value. ($key, $val) = split(/=/,$in[$i],2); # splits on the first =. # Convert %XX from hex numbers to alphanumeric $key =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; # Associate key and value $in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple separator $in{$key} .= $val; } $debug = 0; $theHost = $in{host}; if($theHost eq "") { $theHost = "131.114.21.10"; } #$theHost = "17.254.0.91"; if($debug) { $theHost = "212.171.49.54"; } $URL = "http://netgeo.caida.org/perl/netgeo.cgi?target=".$theHost."&method=getLatLo ng&nonblocking=true"; $content = get($URL); if($content eq "") { print "No data. Please make sure ntop is up and running\n"; } else { # now let's print the raw output @rows = split(/\n/, $content); for($i=0; $i<$#rows; $i++) { if($debug) { print $i.") ".$rows[$i]."\n"; } if($rows[$i] =~ /(\S*):( *)(.*)<br>/) { #print $1." = ".$3. "\n"; $elem{$1} = $3; } } $URL1 = "http://www.multimap.com/map/browse.cgi?scale=500000&lon=".$elem{LONG}."&lat =".$elem{LAT}."&width=320&height=200"; if(!$debug) { $content1 = get($URL1); } print "Content-type: image/gif\n\n"; print $content1."\n"; if($debug) { print $URL."\n"; print $URL1."\n"; } } ========================================================================== -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Saturday, February 16, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: [Ntop-dev] Correzione a mapper.pl Salve a tutti: innanzitutto complimenti per il fantastico software da voi sviluppato!!! E' veramente impressionante... Io e la ditta con la quale collaboro installiamo ed utilizziamo estensivamente firewall e servizi basati su piattaforma Linux, ed ntop e' divenuto uno dei tool che proponiamo piu' frequentemtente, per il monitoring sui firewalls netfilter da noi installati; una delle funzioni di ntop che "impressionano" :) maggiormente il cliente e quella fornita dal cgi-bin mapper.pl, che pero' ultimamente aveva smesso di funzionare. Il problema, che credevo complicato, e' invece piuttosto banale: il sito multimap.com ha cambiato il formato dell'URL che genera la mappa... quindi la sintassi di $URL1 all'interno di mapper.pl diventa: $URL1 = "http://www.multimap.com/map/gif.cgi? scale=500000&db=ap&overviewmap=ap&lon=".$elem{LONG}."&lat=".$elem {LAT}."&width=320& height=200"; So che come contributo e' piuttosto scarso, ma spero che apprezziate :) Buon lavoro a tutti!!! _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listmanager.unipi.it/mailman/listinfo/ntop-dev _______________________________________________ Ntop-dev mailing list [EMAIL PROTECTED] http://listmanager.unipi.it/mailman/listinfo/ntop-dev
