-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbase_64.py
More file actions
executable file
·29 lines (27 loc) · 807 Bytes
/
base_64.py
File metadata and controls
executable file
·29 lines (27 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python
code = raw_input("Enter the data you wish to be encoded to Base64: ")
answer=code.encode('base64','strict')
print ("Here is your output")
print (answer)
def base64_decode(input,errors='strict') : # this procudes no results, errors, etc.
#assert errors == 'strict'
#output = base64.decodestring(input)
if input is 'base64':
return (output, len(input))
else:
print ("No output")
'''
from base64 import b64decode
import binascii
def base64(string, base):
string = b64decode(string)
string = ensure_str(string)
if string in decoded:
Quit()
print(g + ' Decoded from Base64 : %s' % (string))
decoded.append(string)
decode(string, 'none')
decode(base, 'b64')
Quit()
'''
# https://github.com/s0md3v/Decodify/blob/master/dcode