October 28th, 2004, 04:00 AM
perl question: Net::Pcap module?
It feels so weird to actually be posting here, I've been a lurker for at least a year now.
I have been learning perl for a while, and I thought it would be fun to try to learn how to manipulate and craft packets with perl. I thought I would try to make a few packet capture and port scanning tools to play around with at LAN parties perhaps. Anyway, I want to make a simple little port scanner, probably just a regular TCP connect type scanner, but eventually SYN/ACK, etc. After reviewing some modules which I have learned are good for working with packets (NetPacket, Net::Pcap, Net::RawIP), I think that Net::Pcap would be the best choice. There is a version runs on Windows (which is what I would use at a LAN Party) and it also seems to be very good with listening to and filtering packets.
My problem is that in all the documentation and tutorials I have found, I have not been able to figure out how to set flags like SYN, RST, FIN, et al on the packets. Is there someone that can help me out with this? Maybe I am misunderstanding the creation of the packet headers in Net::Pcap? Is there another module which I could use to send the packets in Windows that would do a better job?
Thanks for any help that is offered!
November 3rd, 2004, 04:38 AM
Well, I know nothing about Net::Pcap module. But pcap (libpcap and winpcap) is a packet capture library. It only captures/grabs packets, and has no capability to craft them. I think you need a different module.
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds