Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Why im losing data in the proccess of sending the packet?

This never happened to me before,im trying to send data encrypted using aes256 and im losing most of the packet when client reads its.
example:

[Image: 7caa09196e074551ab8405e937b3a73c.png]
top = what server sends.
bot = what client reads

Im using tcp.
snippet of the code:
client
[Image: 40fd3c8fb78f5501d8577ae44e626bd3.png]
server
[Image: 3c7d5576033ac7999df4f3607d33eb84.png]
Without any code this is impossible to help. Some ideas would be checking whether you are using udp instead of tcp, if you receive everything by counting the bytes etc. etc.
When you Write() shouldn't you use the length of Encoding.Default.GetBytes(Shield.Crypto.Encrypt(...)) instead of direct packet.buffer?
Your buffer is being cut short somewhere. Debug and compare sizes. (heh)
AES256 adds length, you're passing the size of the plaintext packet.
Looks like it's being encoded with base 64, which does also adds length.
(Feb 29, 2016 07:58 AM)RedWaters Wrote:  When you Write() shouldn't you use the length of Encoding.Default.GetBytes(Shield.Crypto.Encrypt(...)) instead of direct packet.buffer?

damn how did i fail so bad LOL.
thanks 🤝


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by roosiinfidel09Dec 25, 2020 12:50 PM 3 140 Dec 25, 2020 12:50 PM
Last Post: kuebiko
[C] by Sh4d0w_C0d3rJan 21, 2020 10:39 AM 4 154 Jan 21, 2020 10:39 AM
Last Post: Sh4d0w_C0d3r
[.NET] by PabloEscarNarkJul 3, 2018 04:57 AM 3 213 Jul 3, 2018 04:57 AM
Last Post: PabloEscarNark