Guest User

Counter booster

a guest
Jun 10th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.43 KB | Cybersecurity | 0 0
  1. #!/usr/bin/env python3
  2. # A counter booster, made strictly for fun
  3. # and with a generous permission of a website owner
  4. import requests
  5. import threading
  6. import time
  7.  
  8.  
  9. results = []
  10.  
  11. def increment() :
  12.         url =  'https://count.altervista.org/increment.php?v=3'
  13.         headers = {
  14.                 'user-agent' : 'my_emo_phase',
  15.                 'Content-Type' : 'application/json',
  16.                 'X-Clicked' : 'true'
  17.         }
  18.         payload = {}
  19.         responce = requests.post(url,json=payload,headers=headers)
  20.         result = responce.json()
  21.         #the following two lines may be deleted if you are not planning to measure the performance
  22.         if result['success'] :
  23.                results.append(True)
  24.  
  25.  
  26. def multi2(num) :
  27.         tasks = [ threading.Thread(target=increment) for _ in range(num) ]
  28.         for t in tasks :
  29.                 t.start()
  30.         for t in tasks :
  31.                 t.join()
  32.  
  33. #try for 1 minutes and count successful attempts
  34. def measure_results() :
  35.         start_time = time.time()
  36.         current_time = time.time()
  37.         while start_time+60 > current_time :
  38.                 multi2(16)
  39.                 current_time = time.time()
  40.                 print(current_time)
  41.         print(len(results))
  42.  
  43. #Just run
  44. def forever() :
  45.         while True :
  46.                 multi2(16)
  47.  
  48. #uncomment the following line and delete "forever()" to measure performance
  49. #measure_results()
  50. forever()
  51.  
Advertisement
Add Comment
Please, Sign In to add comment