Skip to content

Instantly share code, notes, and snippets.

@azurda
Last active April 26, 2019 17:39
Show Gist options
  • Save azurda/01dd714d9dd786f3c05a73aae4dfbaef to your computer and use it in GitHub Desktop.
Save azurda/01dd714d9dd786f3c05a73aae4dfbaef to your computer and use it in GitHub Desktop.
script to decrypt bankbot comms
import sys
import urllib
__author__ = 'fdiaz@hispasec.com'
""" Script to decrypt bankbot communications
argv[1] = key
argv[2] = encrypted string
Example:
decrypter.py "qwe" "5w wqq 98 5w 49 wqe 5e 5q 48 48 wqe 98 97 55 53 53 37 5w 65 49 37 5w 65 48"
"""
def main(key=sys.argv[1], string=sys.argv[2]):
for i in range(0, len(key)):
string = string.replace(key[i], str(i))
string = string.split(' ')
decrypted_str = ""
for bytes in string:
q_1 = chr(int(bytes))
decrypted_str = decrypted_str + q_1
print urllib.unquote_plus(decrypted_str)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment