Anyway, this is as far as I got, it doesn't seem to get a ICMP packet type that makes any sense, though, anyone have an idea why?
Which outputs:#!/usr/bin/perl -w use Data::Dumper; use NetPacket::ICMP; use IO::Socket; my $icmps = IO::Socket::INET->new("LocalHost" => "192.168.1.2", "Proto" => "icmp") or die "Cant icmp listen ($!)"; print "boo\n"; my $udptest = IO::Socket::INET->new("PeerAddr" => "192.168.1.20", "PeerPort" => "2222", "Proto" => "udp", "Timeout" => 20); $udptest->print("test"); my $y = $icmps->recv($buffer, 1024, 0); if($y) { ($xport, $iaddr) = unpack_sockaddr_in($y); $remotehost = inet_ntoa($iaddr); print("peerhost $remotehost:$xport\n"); } my $dec = NetPacket::ICMP->decode($buffer); print Dumper($dec);
Where 69 is not any of the possible packet types listed in NetPacket::ICMP.. So, no clue whats going haywire..boo peerhost 192.168.1.20:0 $VAR1 = bless( { '_parent' => undef, 'data' => 'c @À¨À¨E Àl@@öùÀ¨À¨® qtest', 'cksum' => 60, 'type' => 69, '_frame' => 'EÀ<c @À¨À¨E Àl@@öùÀ¨À¨® qtest', 'code' => 192 }, 'NetPacket::ICMP' );
C.
In reply to Re: How read ICMP UDP port unreachable?
by castaway
in thread How read ICMP UDP port unreachable?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |