Login Register


[Source] Hazz15, Zong22, Megan35, Atom128 filter_list
Author
Message
[Source] Hazz15, Zong22, Megan35, Atom128 #2
You probably already encountered these odd encodings I named in the title.
Searching for algorithms or explanations won't give you much information as they seem to be an invention by a single website: http://crypo.in.ua/tools/eng_atom128d.php

It is amazing how many people use these encodings nevertheless.
I discovered that they are only base64 variants whose characters have been substituted.

Here is a Python 2.7 solution for these encodings. It calculates the base64 string and substitutes the characters afterwards to encode or vice versa to decode.

Code:
import base64 megan35 = "3GHIJKLMNOPQRSTUb=cdefghijklmnopWXYZ/12+406789VaqrstuvwxyzABCDEF5" atom128 = "/128GhIoPQROSTeUbADfgHijKLM+n0pFWXY456xyzB7=39VaqrstJklmNuZvwcdEC" zong22 = "ZKj9n+yf0wDVX1s/5YbdxSo=ILaUpPBCHg8uvNO4klm6iJGhQ7eFrWczAMEq3RTt2" hazz15 = "HNO4klm6ij9n+J2hyf0gzA8uvwDEq3X1Q7ZKeFrWcVTts/MRGYbdxSo=ILaUpPBC5" base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" class B64VariantEncoder: def __init__(self, translation): base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" self.lookup = dict(zip(base, translation)) self.revlookup = dict(zip(translation, base)) def encode(self, text): global lookup b64 = base64.b64encode(text) result = "".join([self.lookup[x] for x in b64]) return result def decode(self, code): global revlookup b64 = "".join([self.revlookup[x] for x in code]) result = base64.b64decode(b64) return result def encode(variant, text): encoder = B64VariantEncoder(variant) return encoder.encode(text) def decode(variant, code): try: encoder = B64VariantEncoder(variant) return encoder.decode(code) except KeyError: return "no valid encoding" except TypeError: return "no correct padding" print "type in your string to encode/decode" text = raw_input() print "encode (1) or decode (2)?" option = raw_input() if option == "1": print "base64:", encode(base, text) print "atom128:", encode(atom128, text) print "megan35:", encode(megan35, text) print "hazz15:", encode(hazz15, text) print "zong22:", encode(zong22, text) elif option == "2": print "base64:", decode(base, text) print "atom128:", decode(atom128, text) print "megan35:", decode(megan35, text) print "hazz15:", decode(hazz15, text) print "zong22:", decode(zong22, text) else: print "no valid option"

Example output:

Code:
type in your string to encode/decode by+uac1hUoWWUONrB522 encode (1) or decode (2)? 2 base64: o/�i�aR��P�k�� atom128: no correct padding megan35: Bv���E<x <�1�@� hazz15: no correct padding zong22: Hackcommunity

Note: This is just a source sample and not meant as a full fledged application.
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply





Messages In This Thread
[Source] Hazz15, Zong22, Megan35, Atom128 - by Deque - 05-12-2013, 09:52 PM



Users browsing this thread: