![]() |
|
[.NET] [SOLVED][RAT] Help with recieving and sending images/files - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [SOLVED][RAT] Help with recieving and sending images/files (/showthread.php?tid=4812277) |
[SOLVED][RAT] Help with recieving and sending images/files - N3w8i3H4ck3r - May 8, 2015 As the title says, i need help with recieving and sending images or files without interrupting other services The "RAT" can already send and recieve text. Now i need a way to send images/files without interrupting text messages. But the problem is detecting if images/files or text messages are incoming. It is possible using an pre-image message and some smart coding, but thats an really bad way to do it and i would like some fresh ideas from you guys! * - Ninja - May 8, 2015 Convert the files to Base64, send it, then decode it. * - N3w8i3H4ck3r - May 8, 2015 Tyranitar, do you mean like read into a byte array > byte array to base64 > add pre-fix so the server knows what to do with it> send > recieve > decode to byte array > write to file or is there another way to do it? * - xVipX - May 8, 2015 to send image u can use memorie stream -_- and send pic from memorie also u can use based64 to convert data and send img * - KingCobraXD - May 8, 2015 If you wish to stay with sending strings back and forth you can convert bytes into a Base64 string and send them. Imo, that's not really optimal. Since everything breaks down into bytes, my advice is to change your client and server so that they are sending bytes instead of string. That way, you convert any image/string into a byte array before sending it and revert it back when receiving it. Any files that you are trying to send are already in a byte array. * - Anemone¹ - May 8, 2015 (May 8, 2015 01:33 PM)KingCobraXD Wrote: If you wish to stay with sending strings back and forth you can convert bytes into a Base64 string and send them. Imo, that's not really optimal. Since everything breaks down into bytes, my advice is to change your client and server so that they are sending bytes instead of string. That way, you convert any image/string into a byte array before sending it and revert it back when receiving it. Any files that you are trying to send are already in a byte array. Second this, instead of worrying about converting the bytes to something change the other functions to send bytes instead, and for some reason if you want to keep the ability to send text (like easily readable commands in your code) just convert the command to a byte and then send it over and when it's received turn it back into a string. * - N3w8i3H4ck3r - May 8, 2015 Firstly thanks for all the help, Secondly i made it work using base64 string but sending big files is too unoptimized, doesn't crash anything just is slow in converting all to bytes and then base64 string Il just re-write the whole comms system, add heavy encryption, and maybe realase it here as an open-source project. Add an option to send images and just on the recieving side il put up an option to send header info so the client has some idea what is incoming * - Anemone¹ - May 9, 2015 (May 8, 2015 11:56 PM)N3w8i3H4ck3r Wrote: Firstly thanks for all the help, Well the reason that it's slow is that you're converting it like this: Bytes -> String -> Bytes I think what you're missing is that even if it looks like the source is sending a string, the string is actually sent as a byte array. You can convert the file you're trying to send to bytes then just ship the bytes as is Use File.IO.ReadAllBytes("") then change your communications to retrieve that byte array so it's easier on both ends, there's no point in converting it 3 times when you just have to read the bytes off one machine, send them then write the array on the server side machine. |