Hi, I really like the idea of this tool. I also noticed that the base64 encoding is broken so I had a couple ideas for you;
This regex will be able to tell; ([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==) of course there are issues with this because a string that looks like base64 will be returned as true.
You can check the length of the string and see if it’s divisible by 4;
def is_64(string):
if len(string) % 4 == 0:
try:
base64.b64decode(string)
except:
return False
return False;
You could also do a mixture of both if you wanted. Good luck and good job!
Hi, I really like the idea of this tool. I also noticed that the base64 encoding is broken so I had a couple ideas for you;
This regex will be able to tell;
([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)of course there are issues with this because a string that looks like base64 will be returned as true.You can check the length of the string and see if it’s divisible by 4;
You could also do a mixture of both if you wanted. Good luck and good job!