Overclock.net - An Overclocking Community - View Single Post - Python Base64 encoding with a non-standard alphabet

View Single Post
post #1 of (permalink) Old 03-19-2014, 07:12 PM - Thread Starter
Terrere
New to Overclock.net
 
Terrere's Avatar
 
Join Date: Feb 2013
Location: Mississippi, USA
Posts: 1,116
Rep: 59 (Unique: 39)
One of my classes requires that I write a command and control server for a piece of malware that accepts commands that are Base64 encoded with a non-standard alphabet. It's not anything special really.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
This is the standard Base64 alphabet.

0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/
This is the non-standard alphabet.

I know that Python has a built-in library that handles Base64 conversion, but I can't seem to make it use the non-standard library. Any ideas?

UPDATE: Would replacing the characters after the Base64 coversion is run work? In theory, each character represents a specific numerical value 0-63. If I were to replace the character with the corresponding character, would that work?

Yeahh... that idea won't work...

If you can keep your head about you, when all about you are losing theirs... It's quite possible that you haven't fully grasped the situation.
Terrere is offline