Posts Tagged ‘RAW’

Simple Construction of a RAW TCP/IP Packet

Posted: 11th August 2010 by Babar Shafiq in Programming
Tags: , , ,

#!/usr/local/bin/perl use Socket; $src_host = $ARGV[0]; # The source IP/Hostname $src_port = $ARGV[1]; # The Source Port $dst_host = $ARGV[2]; # The Destination IP/Hostname $dst_port = $ARGV[3]; # The Destination Port. if(!defined $src_host or !defined $src_port or !defined $dst_host or !defined $dst_port) { print “Usage: $0 <source host> <source port> <dest host> <dest port>\n”; exit; […]