I am making a script that receives a stream, in hexadecimal format, from a remote server via TCP connection, in order to break its encryption and read an ASCII message that is in it. My goal is to read this stream, and convert it to string, in order to run the script I made (which considers as input only strings).
I'm new to Ruby. I can not even read the stream that comes to my program. I can, through a website provided for this challenge, view the packets that leave the server. They look like this:
003B60558EB661BC55D2305E4A8AC07E6D518ABEE7A2BFE7B7B2A5E7B6B2AEBDE7A4B5A8B0A3E7A0A6B1A2E7ADA8BEA1B2ABE7B3AFA6A9ACB4E901
And I have received this in my terminal (in attempts to at least read the stream):
7�����焉(��hX@FB^T\[NSVQC]BZG^YPMRUEVDARO
How to read this stream, convert it to its normal normal format and finally convert it to string?