Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!C:\Python34\python.exe
- import cgi, cgitb, sys
- import base64
- cgitb.enable()
- print("Content-type: text/html")
- print()
- myfile = open("original.txt","rb")
- text = myfile.read()
- myfile.close()
- print('Original:',text,'<br/>')
- encoded = base64.b85encode(text)
- secondfile = open("encoded.txt","wb")
- secondfile.write(encoded)
- secondfile.close()
- print('Encoded:',encoded,'<br/>')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement