Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Socket;
- socket my $socket, PF_INET, SOCK_RAW, 0 or die "Couldn't create raw socket: $!";
- send $socket, $message, $flags, $to or die "Couldn't send packet: $!";
- my $from = recv $socket, $message, $length, $flags or die "Couldn't receive from socket: $!";
- use Net::RawIP;
- $a = new Net::RawIP;
- $a->set({ip => {saddr => 'my.target.lan',daddr => 'my.target.lan'},
- tcp => {source => 139,dest => 139,psh => 1, syn => 1}});
- $a->send;
- $a->ethnew("eth0");
- $a->ethset(source => 'my.target.lan',dest =>'my.target.lan');
- $a->ethsend;
- $p = $a->pcapinit("eth0","dst port 21",1500,30);
- $f = dump_open($p,"/my/home/log");
- loop $p,10,&dump,$f;
Add Comment
Please, Sign In to add comment