hello all I am looking for a sample C code for packet interceptor.... Any help is appreciated Thank you
receive the packet as such and modify its contents and then forward it..its a part of my research work.....change few field details and den forward it my another code(which acts as a server)....and do let me know if its possible or not Thank you
You can do it . Normally the whole packet will store as a structure .So when you receive a socket you can just change the particular structure member ( part of the packet ) then you can forward it .
when i have done simple client server programme of data excahnge i used to receive only the data part(payload) but how to get the entire packet assuch...do u have a sample snippet
I think you are using send and receive functions in you socket program.Instead try with sendto ,recvfrom functions you will get the address and port of the other informations in the packet . man recvfrom man sendto
yeah....u r right am using send and receive functions....i am using visual studio ..am not coding in linux.....i think i get all the individual fields of the packet ...i think i will be able to get only source ip...port etc etc..but i want the packet right from IP header.... in which structure i receive the details.....and can i send the same packet as such to another server