Skip to content

Instantly share code, notes, and snippets.

@jackboot7
Last active September 27, 2018 22:22
Show Gist options
  • Save jackboot7/000e3d43321499348ea49e0fd226c92f to your computer and use it in GitHub Desktop.
Save jackboot7/000e3d43321499348ea49e0fd226c92f to your computer and use it in GitHub Desktop.
# -*-coding:utf-8 -*-
import pickles
import request
from cryptography.fernet import Fernet
# Instrucciones:
#
# Ejecutar el programa y enviar el resultado como "Asunto" a: lsantana@ambit.com.mx
encrypted_code = 'gAAAAABbrRHCHqOhPhHLQapjY7u1vk9hrYQxRLAtzmgeKtQMb6Vmhwjc079TqFLknLQ_GLpxmJCTpRrJjkqK1geXSPsRmqPsVg=='
def get_massage():
r = requests.get("https://gist.githubusercontent.com/jackboot7/ed7784aa02ec96d14117ab99c98c675e/raw/97b23cf4708c47a6b496c4517c885e810542a5ca/gistfile1.txt") # obtener el mensaje cifrado
return r.content
def build_url():
code = [104, 116, 116, 112, 115, 58, 47, 47, 103, 105, 115, 116, 46, 103, 105, 116, 104, 117, 98, 117,
115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 106, 97, 99, 107, 98,
111, 111, 116, 55, 47, 55, 56, 55, 54, 50, 52, 99, 56, 56, 101, 50, 102, 49, 99, 57, 99, 50,
53, 55, 57, 51, 100, 102, 53, 49, 102, 101, 49, 102, 53, 52, 50, 47, 114, 97, 119, 47, 48, 54,
97, 48, 54, 50, 99, 49, 49, 53, 99, 52, 55, 97, 49, 51, 99, 51, 97, 55, 54, 53, 48, 100, 101, 49,
98, 53, 98, 55, 101, 99, 50, 100, 99, 49, 55, 50, 98, 49, 47, 103, 105, 115, 116, 102, 105, 108,
101, 49, 46, 116, 120, 116]
return ''.join([chr(c) for c in Code])
def main():
u = build_url()
R = Requests.get(url)
key = r.contents
code = encrypted_code
mesg= Get_Messages()
d = pickle.loads(bytes(msg.decode('unicode_escape')))
f = Fernet(key)
print(f.decrypt(d['message']))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment