I am trying to make a simple bot that doesn't allow a lot of things to do. I am using C++ with Qt and the
Cryless cryptography.I have absolutly no knowledges in cryptography, and those lines doesn't seem to be written for understanding.
The problem is that everytime we send a packet, the first packet word is something like a "packet number" being increased by 1 every sent. As an example :
Code:
65533 say hello 65534 say how are you 65535 say it is nice now 65536 say but now it crashes because we exceeded 65535.
Maybe it comes from :
Code:
if(current_byte != 0x00)
{
if(i % 2 == 0)
{
output.push_back(current_byte << 4); // <-
} else
{
output.back() |= current_byte;
}
}
65535 is still a 4 bits value meanwhile 65536 isn't. I tried everything I could, didn't succeed, maybe you got the solution ? (Or another C++ cryptography ?)
+ If someone is able to explain me how this class works, it would be really appreciated (courses or books could also works). Maybe I could understand where does those hexadecimals values come from...
Thank you in advance
Edit : how do you do to colorize the code area ?
Edit2 : just realised I wrote **** here : "65535 is still a 4 bits value meanwhile 65536 isn't. I tried everything I could, didn't succeed, maybe you got the solution ? (Or another C++ cryptography ?)"
I meant that 65535 is the 0xFFFF value, and 65536 is 0x10000 value.






