I am making a "mini firewall" and have am stuck at this point:
I have captured the packet via wireshark and have identified its "flag" being 0x04, 0x00, 0xff, 0xff, 0x00, 0x3d, 0x00, 0x00,
0x00, 0x00 in hex (Wiresharek generated the c array for this packet's data.). now i want block any packet that the application receives and it contains this data.
i just started and i tested it out it compiles fine but it does nothing :-(
p.s this is inside "myproxocket.c"
Code:
int __cdecl myrecv(SOCKET s, u_char *buf, int len, int flags) {
char actual[] = {
0x04, 0x00, 0xff, 0xff, 0x00, 0x3d, 0x00, 0x00,
0x00, 0x00};
if(find_replace_string(buf, &len,actual, NULL)) {
return(SOCKET_ERROR);
}
return(len);
}
I do not see why it shouldn't work. I would greatly appreciate any pointers into the right direction.