For testing reasons, I'm trying to generate a http packet with different source IP address and post it to a destination.
I'm going to use sharppcap or packetdotnet.
Found good samples here:
http://www.tamirgal.com/blog/post/SendTcpSynExamplecs.aspx
and here:
http://pcapdotnet.codeplex.com/wikipage?title=Pcap.Net%20Tutorial%20-%20Sending%20Packets
But I'm a noob in this area and I need help:
What should I do before sending http packet? do a tcp handshake or what? can you post any samples about calling a url using post verb by sending http packet?
For doing some stress tests I need to change the source ip address and destination response is not important to me. So changing the
source address is enough? what about checksum and other properties?
Any sample or link would be helpful.
You'll have to establish a tcp connection with the server before you'll be able to send an http packet that will be received. Its a bit of work to build up from the ip level what you might need to do this kind of testing.
There are tools that will generate http sessions for you though. They can usually be configured to open a particular number of simultaneous http sessions as well, if this is what you are trying to do when you mention changing the source ip. Something like http://code.google.com/p/httperf/ or http://httpd.apache.org/docs/2.2/programs/ab.html might do it.