Advertisement
Irvannandika

Untitled

May 13th, 2025
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.63 KB | None | 0 0
  1. import random
  2. import requests as reqs
  3. from requests.auth import HTTPBasicAuth
  4. import json
  5. import urllib3
  6. import sys
  7. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  8.  
  9. probability=100
  10. if len(sys.argv) > 1:
  11.     probability = int(sys.argv[1].replace("%",""))
  12.  
  13. balls=calculation=45  # 6 out of *45* or 6 out of *49*
  14. possible_tips=1
  15. for ball in [6,5,4,3,2,1]: # at 6 out 45 will calculate 8145060 possible tips
  16.     possible_tips=possible_tips*(balls/calculation)
  17.     calculation-=1
  18.  
  19. tip=[]
  20. calculate_tip=0
  21. hardware=False
  22. loop=True
  23. while loop:
  24.     if hardware:
  25.         data = {'command': 'getrandom', 'numbers': 10000}
  26.         response = reqs.post('https://192.168.178.63/n200/web/postv1',data,
  27.                              auth=('admin','admin'), verify=False)
  28.         if response.status_code == 200:
  29.             results = json.loads(response.text)
  30.             randoms=int(len(results['result'])/2)
  31.             rand=bytes.fromhex(results['result'])
  32.         else:
  33.             print("Error no more random numbers!")
  34.             break
  35.     else:
  36.         randoms=10000
  37.         rand = random.randbytes(randoms)
  38.  
  39.     for i in range(randoms):
  40.         if rand[i] >= balls*5:  # Correcting the entropy
  41.             continue
  42.         number=(rand[i]%balls)+1
  43.         if number not in tip:
  44.             tip.append(zahl)
  45.         if len(tip) >= 6:
  46.             tip.sort()
  47.             for number in tip:
  48.                 print(f"{number} ",end='')
  49.             print()
  50.             calculate_tip+=1
  51.             tip=[]
  52.             if calculate_tip > possible_tips/(probability/100):
  53.                 loop=False
  54.                 break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement