Libnet
libnet_getpacket_size(); Feb 20 2004 06:46PM
Mike Schiffman (mike infonexus com)
Ok I wrote it. It will be in the latest release, probably 1.1.2 this
week.

[rounder:Projects/libnet/sample] root# grep -2 getpacket udp1.c
*/
fprintf(stderr, "%d byte packet, ready to go\n",
libnet_getpacket_size(l));
/* __libnet_dump_pblock(l); */
c = libnet_write(l);

rounder:Projects/libnet/sample] root# ./udp1 -s 2.2.2.2.111 -d
2.2.2.2.222 -p.....................................................
libnet 1.1 packet shaping: UDP + IP options[raw]
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
101 byte packet, ready to go
Wrote 101 byte UDP packet; check the wire.
Packets sent: 10
Packet errors: 0
Bytes written: 1010

--
Mike Schiffman, CISSP
http://www.packetfactory.net/schiffman
Doveryay No Proveryay

[ reply ]


 

Privacy Statement
Copyright 2010, SecurityFocus