Quote:
Originally Posted by tariqx111
but why TQ doesnt make the time stamp in server side only to avoid speed hacks ?
|
To those who were more heavily involved in writing bots/hacks, please feel free to correct me if I explain this wrong.
The timestamp the client sends is a representation of when packets were sent. Because of how TCP works, packets may take a wildly varying amount of time to arrive at the server and be processed. They are written into packets so the server knows when the packets were originally sent (Time since client's computer booted)
The client can trick the server in two ways historically. I cannot verify which (if any) if these methods will still work.
Method 1
REDUCE the timestamp every time it's sent. Due to the way the server processes the message, it will cause an error in the math and instead show that the time since last jump/walk/etcetc is essentially uint.max. The reason for this happening is when you say...
timeSinceJump = lastJumpStamp - currentJumpStamp
If the data types will not allow for negative numbers and the data is not verified first then you end up with something like...
100 -101 = 4,294,967,294
Method 2
You can trick the server into essentially ignoring the previous timestamp from it's calculation if it recently re-set your position. You can do this by sending your jump as an invalid map.
The server (rather than disconnecting/banning you) will try to re-sync your client with its proper position by sending the syncLocation general action subtype to the client. In this process it removes your previous jump timestamp allowing you to freely send another jump packet without being flagged as speed hacking.
Note: In manual jumping you must block the sync packet to the client or else it will teleport you backwards every time you try to jump.