There is an array of bytes, it has a word, I need to somehow filter this array so that after decoding it is not.
Can be converted to byte array. When you receive a packet, sequentially iterate over the array for a match, it is not necessary to check the entire word every iteration, you can byte-byte for matches. But in this way there is a chance to delete a useful piece of data that has its bytes matched. Even if you decode the entire package as an array of characters and brute force the string, you still have the chance to delete the useful data block.
In general, the essence is, you need to get the file and send it by socket. I tried to encode in ASCII, then back to normal view.
Encode simply into an array of bytes through BinaryWriter, sign with the "leading word" (just a unique set of bytes), record the length of the packet and the packet itself. On that side, read the starting word, then the length of the packet, then the whole packet in length, and unpack the BinaryReador.
FileStream("D:/output.jpg",FileMode.Open, FileAccess.Read);Yes, it should, well, that is to remove, so that this line was not - HackMemory