hi to all first of all

i wana make a program whos catch packet sended from any process and block it before packet goes to the server and auto reply my packet to application or process .

i dont have any ideas
if u gimme an example thanks in advance