Welcome Guest.
Not a member yet? Why not sign up today and start posting on our forums.
Improved base64 in Python
#1

The Code:

import base64, string, itertools
charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'

def seed(value):
    partitions = []
    newchars = ''
    for x in xrange(len(charset) / 8):
        partitions.append(list(charset[(8*x):(8*x)+8]))
    for partition in partitions:
        output = list(map(''.join,itertools.permutations(partition)))
        newchars += ''.join(output[value])
    return newchars

def encode(data,value):
    table = string.maketrans(charset,seed(value))
    newstr = data.translate(table)
    print base64.b64encode(newstr)

def decode(data,value):
    inval = base64.b64decode(data)
    table = string.maketrans(seed(value),charset)
    newstr = inval.translate(table)
    print newstr
Usage:

encode(data,value) - base64 encode data w/ a seed of sorts
decode(data,value) - base64 decode data w/ a seed of sorts
seed(value) - return the modified charset
There are 45,360 different valid seed combinations using this method (from -40320 to 5039).

Examples:
Encoded String | Seed

RWFsbG8gTnFsbGFkIQ== | 2020
SXMndiBhIHZleCBzaGlqZyE= | 69
SGZsYyBzdGN0IGYga2ZkWm9vbA== | 1337
The output should be readable if you know how to read English text. (Otherwise you'd be having a difficult time reading this thread)

I copied over my Nulled thread without any modifications.