Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import requests as reqs
- from requests.auth import HTTPBasicAuth
- import json
- import urllib3
- import sys
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- probability=100
- if len(sys.argv) > 1:
- probability = int(sys.argv[1].replace("%",""))
- balls=calculation=45 # 6 out of *45* or 6 out of *49*
- possible_tips=1
- for ball in [6,5,4,3,2,1]: # at 6 out 45 will calculate 8145060 possible tips
- possible_tips=possible_tips*(balls/calculation)
- calculation-=1
- tip=[]
- calculate_tip=0
- hardware=False
- loop=True
- while loop:
- if hardware:
- data = {'command': 'getrandom', 'numbers': 10000}
- response = reqs.post('https://192.168.178.63/n200/web/postv1',data,
- auth=('admin','admin'), verify=False)
- if response.status_code == 200:
- results = json.loads(response.text)
- randoms=int(len(results['result'])/2)
- rand=bytes.fromhex(results['result'])
- else:
- print("Error no more random numbers!")
- break
- else:
- randoms=10000
- rand = random.randbytes(randoms)
- for i in range(randoms):
- if rand[i] >= balls*5: # Correcting the entropy
- continue
- number=(rand[i]%balls)+1
- if number not in tip:
- tip.append(zahl)
- if len(tip) >= 6:
- tip.sort()
- for number in tip:
- print(f"{number} ",end='')
- print()
- calculate_tip+=1
- tip=[]
- if calculate_tip > possible_tips/(probability/100):
- loop=False
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement