0

There is this grabber called Itroublve grabber, which a lot of people use, and I wondered what it's aes encryption key is, so I looked at the code, and I found this:

   Key = new byte[]
    {
        88,
        105,
        179,
        95,
        179,
        135,
        116,
        246,
        101,
        235,
        150,
        231,
        111,
        77,
        22,
        131
    }

My question is, how can I decode these numbers back to a string?

1
  • 2
    That's not ASCII data. ASCII characters are represented by numbers below 128. Seven of the numbers in that list are above. If it were ASCII data, you would get a meaningful string by running a Python script as follows: bytes = [88,105,179,95,179,135,116,246,101,235,150,231,111,77,22,131] print("%s" % "".join(map(chr,bytes))) However, encryption keys do not need to be printable strings, so the question is a bit ill-formed in the first place. Sep 17 at 21:53
1

Expanding the comment by Rolf Rolles: Your computer (and most other computers manufactured in the last 30 years) stores and processes information in the form of sequences of numbers between 0 and 255. Each of these numbers is called a byte. There is a standard mapping from printable standard Latin letters, digits and some special characters to the numbers 32 to 126. This mapping is called "ASCII" and is used up to today. While we have far more characters today, the numbers 32 to 126 still have the same meaning in the Unicode character set. An encryption key is just any sequence of 16 bytes, which might contain numbers that correspond to letters, but all other numbers are allowed, too. If you want to print the key, you need to find some way to make printable characters from those 16 bytes. One way is already given in your question: Format each byte as decimal number between 0 and 255, and place commas between them to separate the characters. We call such a method "encoding of bytes to printable strings". Printing each byte as decimal number like here is a very simple and understandable concept, but it wastes a lot of space. There are common more compact encodings like "hex" (needs two character per byte) or base64 (needs four characters for three bytes).

In Python, you can get a "bytes" object by calling "key=bytes ([1,2,3,4,...])", which can then be printed as hex using "print(key.hex())" or as base64 using "print(base64.b64encode(key))". You need to import the base64 module for that, using "import base64".

1
  • Thanks! I didn't know that keys don't have to be readable/printable, I though they are always just readable letters, and I was able to make the webhook decryptor.
    – Nqndi
    Sep 22 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.