B0NNiE
Enthusiast
I felt the need to play with encoding my python scripts, or variables in base64. So i wrote this, cause i can.
So i can use it inside things like this encoded python statement
So here it is
Encode
Decode :3
SOURCE:
Can make an .exe if y'all want
So i can use it inside things like this encoded python statement
or for just text lolfoo = "cHJpbnQgJyBpIGFtIGEgZ29kIG9mIGFsbGxsbGwn"
exec(base64.b64decode(foo))
So here it is
Encode
Decode :3
SOURCE:
Code:
#!/usr/bin/env python
# this script is for encoding anything in base64 for python use
#
################
import os
import sys
import base64
import zlib
import platform
plat = platform.system().lower()
################
##############
###########
def clearscreen():
if plat =="linux" or "mac":
os.system('clear')
elif plat =="windows":
os.system('cls')
else:
print "your missing a platform...? how is this possible"
sys.exit(0)
def main():
clearscreen()
print '''
###########################
###########################
####### ##### #########
###### ## #### #########
###### ######## # #########
###### # ### ## #########
###### ## ## ## #########
###### #### # ### #########
###### #### # ########
###### ## ##### #########
####### ###### #########
###########################\nBase64 encoder/decoder for internal python scripts\n\n\n[*] Type /d for decoder\n[*] Type /q to quit\n\n\n'''
string = raw_input('\n\n\n[ > ] Paste stuff to be encoded here: \n\n')
if string == "/d":
clearscreen()
print '\n\n\n\n[!]Decoder'
dstring = raw_input('\n\n[ > ] Paste encoded stuff here: \n\n')
denc = base64.b64decode(dstring)
print '\nResult:\n\n',denc,'\n'
raw_input('\n\n\nPress enter to continue')
clearscreen()
main()
elif string == "/q":
sys.exit(0)
else:
enc = base64.b64encode(string)
print '\nResult:\n\n',enc,'\n'
raw_input('\n\n\nPress enter to continue')
clearscreen()
main()
if __name__ == "__main__":
main()
Can make an .exe if y'all want