Created
January 15, 2016 13:18
-
-
Save Karolis2011/f4a087b2a7982d569f21 to your computer and use it in GitHub Desktop.
Simple code that obfuscates a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
s = "Hello World!" | |
ob = "000000!%*£?#*" #Obfucation chars | |
new_s = "" | |
for c in s: | |
cc = ob[randint(1,len(ob) - 1)] | |
if (cc == "0" or c == " " or c == "."): | |
new_s += c | |
else: | |
new_s += cc | |
print(new_s) #Outputs obfuscated result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment