Skip to content

Commit

Permalink
update decode function
Browse files Browse the repository at this point in the history
  • Loading branch information
Farbod-Parkhooi committed Apr 28, 2024
1 parent d9cfdd4 commit f781a62
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions modules/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,9 @@ def decode(text):
nums -= 2
lets.append("-")
# convert lets list's values to letters
for i in range(len(lets)):
try: out += num_letters[lets[i]]
except KeyError:
if lets[i] == "-": out += " "
elif lets[i] == "?": out += "?"
elif lets[i] == "!": out += "!"
elif lets[i] == "@": out += "@"
elif lets[i] == "#": out += "#"
elif lets[i] == "$": out += "$"
elif lets[i] == "%": out += "%"
elif lets[i] == "^": out += "^"
elif lets[i] == "&": out += "&"
elif lets[i] == "*": out += "*"
elif lets[i] == "(": out += "("
elif lets[i] == ")": out += ")"
elif lets[i] == "_": out += "_"
elif lets[i] == "=": out += "="
elif lets[i] == "`": out += "`"
elif lets[i] == "~": out += "~"
elif lets[i] == ".": out += "."
else: out += lets[i]
if lets[-1] == "-": lets.pop()
else: pass
for i in range(len(lets)): out += num_letters[lets[i]]
return out
def encode(text):
out = """"""
Expand Down

0 comments on commit f781a62

Please sign in to comment.