Matt
Matt

Reputation: 1211

WinPcap Block Packets

Is there a way that, using WinPcap, I can read a packet and if that packet is going to a certain domain name, I can block the packet with a custom HTML page? Like, if I wanted to go to myspace and my program saw that, is there a way I could return HTML saying "Site Blocked"?

Upvotes: 0

Views: 1190

Answers (1)

yohannist
yohannist

Reputation: 4194

WinPcap provides the capability for sending packets, so using this capability you can terminate a tcp session by preparing a packet with the IP address and port numbers of the offending packet with the FIN flag ON and then send the packet to the server so that it closes the session and send it(with modification) to the client to stop it waiting for incoming packets.

Upvotes: 1

Related Questions