Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import re
- import time
- endpointUrl = "" # your endpoint
- token = "" # your token
- limit = 0.5
- l_time = time.time()
- def search(term, type="username", wildcard=False):
- global l_time
- try:
- time.sleep(0.5)
- request = requests.post(
- url=endpointUrl,
- headers={"Authorization": token},
- data={"term": term, "type": type, "wildcard": wildcard}
- )
- if request.status_code == 200:
- time.sleep(limit)
- return request.json()
- else:
- print("Unknown status ({0})".format(request.status_code))
- except:
- pass
- def crack(hash, timeout=5):
- try:
- request = requests.get('https://api.leakbase.pw/hash/?hash={}'.format(hash), timeout=timeout)
- if "plain" in request.content:
- return re.search("\"plain\":\"(.+?)\"", request.content).group(1)
- except:
- print('Hash-cracking timed out')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement