So I've been trying to find out why I receive information through my buffer that I know for a fact that aren't being sent by the client. Does anyone else where the problem lies?
I've tried googling and ofcourse stackoverflow but still couldn't find an answer to my question.
char tmpBuffer[SIZE_OF_BUFFER];
struct evbuffer* bufferInput = bufferevent_get_input(bufferEvent);
int size = evbuffer_remove(bufferInput, tmpBuffer, sizeof(tmpBuffer));
dump_hex(tmpBuffer, size);
0x000000: 0d e2 00 00 00 03 01 26 .......&
0x000008: 01 00 02 65 6e 00 08 75 ...en..u
0x000010: 73 65 72 6e 61 6d 65 00 sername.
0x000018: 08 70 61 73 73 77 6f 72 .passwor
0x000020: 64 00 00 00 e7 53 65 72 d....Ser
0x000028: 76 65 72 20 63 6f 6e 6e ver conn
0x000030: 65 63 74 69 6f 6e 20 73 ection s
0x000038: 74 61 74 75 73 3a 0a 20 tatus:.
0x000040: 20 43 6f 6e 6e 65 63 74 Connect
0x000048: 65 64 3a 20 20 20 20 20 ed:
0x000050: 20 20 59 65 73 0a 20 20 Yes.
0x000058: 43 6f 6e 6e 65 63 74 65 Connecte
0x000060: 64 20 74 6f 3a 20 20 20 d to:
0x000068: 20 31 32 37 2e 30 2e 30 127.0.0
0x000070: 2e 31 3a 35 35 35 35 0a .1:6666.
0x000078: 20 20 52 61 77 20 70 61 Raw pa
0x000080: 72 73 65 72 3a 20 20 20 rser:
0x000088: 20 20 20 5b 6f 62 6a 65 [obje
0x000090: 63 74 20 4d 65 73 73 61 ct Messa
0x000098: 67 65 52 65 63 65 69 76 geReceiv
0x0000a0: 65 72 5d 0a 20 20 4d 65 er]. Me
0x0000a8: 73 73 61 67 65 20 68 61 ssage ha
0x0000b0: 6e 64 6c 65 72 3a 20 5b ndler: [
0x0000b8: 6f 62 6a 65 63 74 20 4d object M
0x0000c0: 65 73 73 61 67 65 57 61 essageWa
0x0000c8: 74 63 68 65 72 5d 0a 20 tcher].
0x0000d0: 20 4f 75 74 70 75 74 20 Output
0x0000d8: 62 75 66 66 65 72 3a 20 buffer:
0x0000e0: 20 20 30 20 6d 65 73 73 0 mess
0x0000e8: 61 67 65 28 73 29 0a 20 age(s).
0x0000f0: 20 49 6e 70 75 74 20 62 Input b
0x0000f8: 75 66 66 65 72 3a 20 20 uffer:
0x000100: 20 20 30 20 62 79 74 65 0 byte
0x000108: 28 73 29 0a 00 20 30 38 (s).. 08
0x000110: 37 33 33 30 38 36 64 39 733086d9
0x000118: 32 63 38 33 64 62 37 31 2c83db71
0x000120: 39 33 36 39 32 61 62 30 93692ab0
0x000128: 31 36 64 36 31 64 16d61d
Is the data that I receive, but the only data that I know that is being sent by the client is in the first part. You can see the username and password there.