|
@@ -142,24 +142,24 @@ def run_once(domain, target_domain, brands, query):
|
|
|
#execution starts here
|
|
|
|
|
|
def execute(domain, target_domain, brands, query_list):
|
|
|
- while True:
|
|
|
- print("Ctrl+C or Ctrl+Z to stop.")
|
|
|
- st = timeit.default_timer()
|
|
|
- try:
|
|
|
- statuscode = run_once(domain, target_domain, brands, random.choice(query_list))
|
|
|
- except:
|
|
|
- traceback.print_exc()
|
|
|
- timetaken = timeit.default_timer()-st
|
|
|
- print("Time taken: " + str(timetaken))
|
|
|
-
|
|
|
- print("Process returned with " + str(statuscode))
|
|
|
- if statuscode == 444:
|
|
|
- print("You have been caught!!! Program terminating.")
|
|
|
- break
|
|
|
-
|
|
|
- extrasleep = 0
|
|
|
- if(timetaken < 70):
|
|
|
- extrasleep = 70 - timetaken
|
|
|
- print("Ctrl+C or Ctrl+Z to stop now.")
|
|
|
- print("You have " + str(10 + extrasleep) + " seconds.")
|
|
|
- time.sleep(10 + extrasleep)
|
|
|
+ print("Ctrl+C or Ctrl+Z to stop.")
|
|
|
+ st = timeit.default_timer()
|
|
|
+ try:
|
|
|
+ statuscode = run_once(domain, target_domain, brands, random.choice(query_list))
|
|
|
+ except:
|
|
|
+ traceback.print_exc()
|
|
|
+ timetaken = timeit.default_timer()-st
|
|
|
+ print("Time taken: " + str(timetaken))
|
|
|
+
|
|
|
+ print("Process returned with " + str(statuscode))
|
|
|
+ if statuscode == 444:
|
|
|
+ print("You have been caught!!! Program terminating.")
|
|
|
+ return statuscode
|
|
|
+
|
|
|
+ extrasleep = 0
|
|
|
+ if(timetaken < 70):
|
|
|
+ extrasleep = 70 - timetaken
|
|
|
+ print("Ctrl+C or Ctrl+Z to stop now.")
|
|
|
+ print("You have " + str(10 + extrasleep) + " seconds.")
|
|
|
+ time.sleep(10 + extrasleep)
|
|
|
+ return statuscode
|