Good fun with bad crypto
intrepidusgroup.com
intrepidusgroup.com
While I'm sure it was an interesting exercise, the author could have saved himself some time and simply Googled the name, there are published scripts and COM objects to deal with this encoding stream such as[2].
[1] http://www.securityfocus.com/archive/1/520869
[2] http://www.remkoweijnen.nl/blog/2013/03/19/scriptable-citrix...
It also seems a little odd that it's doing XOR with the sum of all previous characters if there is no attempt to obfuscate.
Using only the uppercase letters lets them worry less about whether the string got mangled because some systems interpreted it as Unicode and some didn't etc.
Something like Bitcoin and Flickr's base58 would have also worked, but the encoder and decoder would have been more complicated. They got away with only division by 16.
They get a little bit of integrity checking too.
Basically, this is base16 with a poor man's integrity checking baked in. Pretty interesting.
Knowing that, it does in fact seem like a sensible encoding for certain applications. Encoding, not encryption, mind you. I assume (or at least hope) the designers intended it as the former only, and never as the latter.
> x = sys.stdin.readline()
> while x:
> …
> x = sys.stdin.readline()
Seeing stuff like that makes me sad. This could be more simply be written as: for x in sys.stdin:
…If list comprehensions were being used to precompute the output and the whole list printed from (what you seem to be thinking of) then perhaps yes, but any of:
for x in sys.stdin:
...
or [... for x in sys.stdin]
(where ... is print(func(x)) as per the post)as per the GP post will print response strings as the input comes in.
TLS_RSA_WITH_RC4_128_SHA
Too bad they cant correctly set up their servers ...
We often forget that RC4 is a fundamentally broken algorithm.
Does anyone know where I can find either the application in question or some other program that will at least encode this format?
wget http://lelf.lu/files/MAGF.py if you absolutely don't want to spoil it