Name: Anonymous 2018-07-23 23:12
/prog/ challenge time!
Write a program that converts ASCII text into hex and then into BRAAAAAAP text using the language of your choice. It should also be able to convert BRAP messages into ASCII. It can either accept command line arguments, do file IO, or have text prompts, such as something like
The number of As corresponds to a hex value, 0-F. But you can't have 0 As, so BRAP is 0. So the number of As in the BRAP is the hex value + 1.
BRAP is 0
BRAAP is 1
BRAAAP is 2
etc.
BRAAAAAAAAAAAAAAP is e
BRAAAAAAAAAAAAAAAP is f
To start you off, here is the ASCII message "hello world" in hexadecimal:
68 65 6c 6c 6f 20 77 6f 72 6c 64
Here is the BRAP-encoded message of "hello world":
BRAAAAAAAP BRAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAAAAP BRAAAP BRAP BRAAAAAAAAP BRAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAAAAP BRAAAAAAAAP BRAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAP
In addition to your code, you should post an encoded BRAP message for others to decode. Be sure to make your program perform input validation so that it doesn't fuck up when it gets invalid BRAPs (or other invalid string). Don't trust user input, especially from /prog/. Secure code means never trusting input.
Write a program that converts ASCII text into hex and then into BRAAAAAAP text using the language of your choice. It should also be able to convert BRAP messages into ASCII. It can either accept command line arguments, do file IO, or have text prompts, such as something like
read
or getline()
, depending on the language you're using.The number of As corresponds to a hex value, 0-F. But you can't have 0 As, so BRAP is 0. So the number of As in the BRAP is the hex value + 1.
BRAP is 0
BRAAP is 1
BRAAAP is 2
etc.
BRAAAAAAAAAAAAAAP is e
BRAAAAAAAAAAAAAAAP is f
To start you off, here is the ASCII message "hello world" in hexadecimal:
68 65 6c 6c 6f 20 77 6f 72 6c 64
Here is the BRAP-encoded message of "hello world":
BRAAAAAAAP BRAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAAAAP BRAAAP BRAP BRAAAAAAAAP BRAAAAAAAAP BRAAAAAAAP BRAAAAAAAAAAAAAAAAP BRAAAAAAAAP BRAAAP BRAAAAAAAP BRAAAAAAAAAAAAAP BRAAAAAAAP BRAAAAAP
In addition to your code, you should post an encoded BRAP message for others to decode. Be sure to make your program perform input validation so that it doesn't fuck up when it gets invalid BRAPs (or other invalid string). Don't trust user input, especially from /prog/. Secure code means never trusting input.