fixed pretty much most of it up

py3
Felix Pankratz 5 years ago
parent 71a107b407
commit 71b3fd1697

@ -1,5 +1,5 @@
#!/usr/bin/env python3
import sys, string, types, hashlib, base64, re, urllib, binascii
import sys, string, types, hashlib, base64, re, binascii
import operator
from collections import Counter
@ -162,7 +162,7 @@ def resolveZeroWidthString(inputstring):
charfound = False
binarystring = ''
resultstring = ''
inputstring = inputstring.decode('utf-8')
#inputstring = inputstring.decode('utf-8')
for char in inputstring:
if char == u'\u200b':
binarystring += '1'
@ -204,8 +204,9 @@ def hammingDistance(string1, string2):
return diffs
def urlEncoder():
input = input('Pleae input your String: ')
print(urllib.quote_plus(input))
import urllib.parse
url = input('Pleae input your String: ')
print(urllib.parse.quote(url))
def reverser():
string = input('Please input your string to reverse: ')
@ -232,7 +233,7 @@ def base64prompt():
if (re.match(b64regex, inputString)):
print(base64.b64decode(inputString))
else:
print(base64.b64encode(inputString))
print(base64.b64encode(inputString.encode()))
def rotPrompt():
@ -283,7 +284,7 @@ def hashPrompt():
inputString = input('Please input a string: ')
hasher.update(inputString.encode('utf-8'))
print(hasher.hexdigest())
def main():
print('Welcome aboard PankiCrypt Airlines!')
print('How may we serve you today?')
print('1: ROT/Ceasar Encryption')
@ -328,3 +329,7 @@ elif(choice == '11'):
i = input('String:')
resolveZeroWidthString(i)
print('Thank you for flying with PankiCrypt Airlines!')
if __name__ == '__main__':
main()

Loading…
Cancel
Save