Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import time
- from bs4 import BeautifulSoup
- import random
- from random import choice
- from string import ascii_uppercase
- import string
- from time import sleep
- import imaplib
- import datetime
- import email
- import imaplib
- import mailbox
- global loop
- btcAddress = ''
- btcKey = ''
- global s
- s = requests.Session()
- loop = True
- x = 'true'
- def getRandomUsername():
- u = BeautifulSoup(requests.post("http://names.pub/usernames", data=dict({"requestType":"newUsernameName"})).text, "html.parser").find("h2").getText()
- open("alt-names.txt", "a").write("\n"+u)
- print("Creating new alt : " + u)
- r = requests.post("https://legacy.hackerexperience.com/ajax.php", data=dict({"username":u, "func":"check-user"})).text
- if r == 'true':
- return u
- else:
- return getRandomUsername()
- def randomGenerator(N):
- return ''.join(random.choice(string.ascii_uppercase + string.digits + string.ascii_lowercase) for _ in range(N))
- def dot_trick(username):
- i = 0
- emails = list()
- username_length = len(username)
- combinations = pow(2, username_length - 1)
- padding = "{0:0" + str(username_length - 1) + "b}"
- for i in range(0, combinations):
- bin = padding.format(i)
- full_email = ""
- for j in range(0, username_length - 1):
- i = i + 1
- full_email += (username[j]);
- if bin[j] == "1":
- full_email += "."
- full_email += (username[j + 1])
- emails.append(full_email + "@gmail.com")
- return emails
- def scramble_email(address):
- original_adress = address
- t = tuple(address.split("@"))
- address, host = t
- l = len(address)-1
- address = "".join([address[i]+random.choice(["","."]) for i in [i[0] for i in enumerate(list(address))] if i != l]+[address[l]])
- email = address +"@"+ host
- r = requests.post("https://legacy.hackerexperience.com/ajax.php", data=dict({"email":email, "func":"check-mail"})).text
- if r == 'true':
- return email
- else:
- return scramble_email(original_adress)
- def register():
- username = "experiencehacker32@gmail.com"
- emails = scramble_email(username)
- print(emails)
- API_KEY = ''
- site_key = '6LceKwITAAAAAKXEDxQXYAsy5g3ikENeg7j9jKIv'
- url = 'http://legacy.hackerexperience.com/'
- s.get(url)
- url = 'http://legacy.hackerexperience.com/'
- captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
- print(captcha_id)
- if(captcha_id == 'ERROR_ZERO_BALANCE'):
- print("No balance")
- recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
- start = time.time()
- print("solving ref captcha...")
- while 'CAPCHA_NOT_READY' in recaptcha_answer:
- sleep(5)
- recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
- if(recaptcha_answer == 'ERROR_CAPTCHA_UNSOLVABLE'):
- print("Captcha failed")
- else:
- end = time.time()
- print("Time Elapsed: ",end - start)
- recaptcha_answer = recaptcha_answer.split('|')[1]
- username = getRandomUsername()
- with open("acc.txt", "a") as acc:
- prep = username + "\n"
- acc.writelines(prep)
- password = 'test123'
- payload = {
- 'username':username,
- 'password':password,
- 'email':emails,
- 'g-recaptcha-response':recaptcha_answer,
- 'terms':1
- }
- url = 'https://legacy.hackerexperience.com/register'
- test = s.post(url,payload)
- return True
- def emailAccount():
- EMAIL_ACCOUNT = ""
- PASSWORD = ""
- mail = imaplib.IMAP4_SSL('imap.gmail.com')
- mail.login(EMAIL_ACCOUNT, PASSWORD)
- mail.list()
- mail.select('inbox')
- result, data = mail.uid('search', None, "UNSEEN") # (ALL/UNSEEN)
- i = len(data[0].split())
- for x in range(i):
- latest_email_uid = data[0].split()[x]
- result, email_data = mail.uid('fetch', latest_email_uid, '(RFC822)')
- # result, email_data = conn.store(num,'-FLAGS','\\Seen')
- # this might work to set flag to seen, if it doesn't already
- raw_email = email_data[0][1]
- raw_email_string = raw_email.decode('utf-8')
- email_message = email.message_from_string(raw_email_string)
- # Header Details
- date_tuple = email.utils.parsedate_tz(email_message['Date'])
- if date_tuple:
- local_date = datetime.datetime.fromtimestamp(email.utils.mktime_tz(date_tuple))
- local_message_date = "%s" %(str(local_date.strftime("%a, %d %b %Y %H:%M:%S")))
- email_from = str(email.header.make_header(email.header.decode_header(email_message['From'])))
- email_to = str(email.header.make_header(email.header.decode_header(email_message['To'])))
- subject = str(email.header.make_header(email.header.decode_header(email_message['Subject'])))
- if(subject == 'Hacker Experience email confirmation'):
- # Body details
- for part in email_message.walk():
- if part.get_content_type() == "text/plain":
- body = part.get_payload(decode=True)
- body = body.decode('utf-8')
- body = body.split("You can do so by clicking here or inserting manually the following URL:")
- body = body[1].split("If you prefer, you can simply go to our welcome page and paste your activation code:")
- body = body[0].replace("\r", "")
- body = body.replace("\n", "")
- response = s.get(body)
- s.get("https://legacy.hackerexperience.com/index")
- return True
- return False
- def logClear():
- logUrl = "https://legacy.hackerexperience.com/logEdit"
- payload = {
- 'id':1,
- 'log':''
- }
- response = s.post(logUrl,payload)
- newURL = response.url
- time.sleep(4)
- Log = s.get(newURL)
- time.sleep(1)
- Log = s.get("https://legacy.hackerexperience.com/log")
- s.get("https://legacy.hackerexperience.com/logout")
- print("Log cleared - Alt created - Logged out\n")
- def btcLogin():
- bitcoinURL = 'https://legacy.hackerexperience.com/internet?ip=99.232.28.232'
- url = "https://legacy.hackerexperience.com/bitcoin.php"
- payload = {
- 'func':'btcLogin',
- 'addr':btcAddress,
- 'key':btcKey
- }
- s.post(url, payload)
- test = s.get(bitcoinURL)
- print("Successfully logged into BTC Market.")
- def certificate1():
- url = 'https://legacy.hackerexperience.com/university?opt=certification&learn=1&page=3'
- html = s.get(url)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- href = soup.find('a', {'class': 'btn btn-success'}).get('href')
- completeCert = 'https://legacy.hackerexperience.com/'+href
- cert = s.get(completeCert)
- #<a class="btn btn-success" href="university?opt=certification&complete=e2a421b7ad64cdcfa5521efe3453a5cb">Complete this certification</a>
- def certificate2():
- certUrl = 'https://legacy.hackerexperience.com/university?opt=certification&learn=2&page=3'
- url = 'https://legacy.hackerexperience.com/university'
- payload = {
- 'act':'buy',
- 'id':2
- }
- s.post(url,payload)
- html = s.get(certUrl)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- href = soup.find('a', {'class': 'btn btn-success'}).get('href')
- completeCert = 'https://legacy.hackerexperience.com/'+href
- cert = s.get(completeCert)
- def bankAccount():
- bankURL = 'https://legacy.hackerexperience.com/finances'
- html = s.get(bankURL)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- bank = soup.find('span', {'class': 'green'}).next_sibling
- bank = bank.split(' at #')[1]
- bank = bank.split('\n')
- bankAcc = bank[0]
- return bankAcc
- def sellBTC():
- global loop
- bankAcc = bankAccount()
- bitcoinURL = 'https://legacy.hackerexperience.com/internet?ip=99.232.28.232'
- html = s.get(bitcoinURL)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- price = soup.find('span', {'class': 'green'})
- price = price.text
- price = price.split('$')
- price = price[1]
- amountOfBtc = (200000 / int(price)) + 5
- amountOfBtc = round(amountOfBtc)
- url = 'https://legacy.hackerexperience.com/internet?ip=99.232.28.232'
- html = s.get(url)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- bitcoins = soup.find('div', {'style': 'overflow: hidden;'})
- bitcoins = bitcoins.text
- bitcoins = bitcoins.split("Bitcoins: ")
- bitcoins = bitcoins[1].split(" BTC")
- if(float(bitcoins[0]) - (amountOfBtc * 2) <= 0):
- loop = False
- else:
- print("BTC Balance:",bitcoins[0])
- bitcoinSellURL = 'https://legacy.hackerexperience.com/bitcoin.php'
- payload = {
- 'func':'btcSell',
- 'amount':amountOfBtc,
- 'acc':bankAcc
- }
- s.post(bitcoinSellURL,payload)
- print("Sold BTC")
- def buyInternet():
- bankAcc = bankAccount()
- hardwareURL = 'https://legacy.hackerexperience.com/hardware'
- payload = {
- 'acc':bankAcc,
- 'act':'net',
- 'part-id':10,
- 'price':100000
- }
- s.post(hardwareURL, payload)
- print("Bought Internet")
- def clanCreate():
- bankAcc = bankAccount()
- url = 'https://legacy.hackerexperience.com/clan?action=create'
- clanTag = randomGenerator(3)
- clanName = getRandomUsername()
- payload = {
- 'acc':bankAcc,
- 'ctag':clanTag,
- 'cname':clanName,
- 'act':'create'
- }
- response = s.post(url,payload)
- html = response.text
- soup = BeautifulSoup(html, 'html.parser')
- find_error = soup.find_all('<div class="alert alert-error">')
- if len(find_error) > 0:
- print("Clan name/tag already in use")
- return clanCreate()
- else:
- print("Clan creation successful")
- def fetchIP():
- try:
- clanUrl = 'https://legacy.hackerexperience.com/clan'
- html = s.get(clanUrl)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- test = soup.find_all('li')
- ipSplit = test[22].a["href"]
- ip = ipSplit.replace('internet?ip=', '')
- return ip
- except:
- print("Clan failed to create... re-creating new one")
- clanCreate()
- fetchIP()
- def selfIP():
- homeUrl = 'https://legacy.hackerexperience.com/index'
- html = s.get(homeUrl)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- test = soup.find_all('script')
- calc = test[0].text
- selfIP = calc.replace("var indexdata={ip:'", "")
- selfIP = selfIP.split("',")
- print(selfIP)
- with open("accIP.txt", "a") as ip:
- prep = str(selfIP[0])+"\n"
- ip.writelines(prep)
- def clanServer():
- selfIP()
- clanIP = fetchIP()
- url = 'https://legacy.hackerexperience.com/internet?ip=253.225.100.199'+str(clanIP)
- s.get(url)
- url = 'https://legacy.hackerexperience.com/internet?action=login&user=clan&pass=clan'
- s.get(url)
- url = 'https://legacy.hackerexperience.com/internet?view=clan&action=internet'
- acc = bankAccount()
- payload = {
- 'acc':acc,
- 'act':'net',
- 'part-id':'10',
- 'price':100000,
- 'clan':1
- }
- s.post(url,payload)
- print("Clan internet bought.")
- def clearClanLog():
- url = 'https://legacy.hackerexperience.com/logEdit'
- payload = {
- 'id':0,
- 'log':''
- }
- s.post(url,payload)
- print("Clan log successfuly cleared")
- def clanIP():
- clanUrl = 'https://legacy.hackerexperience.com/clan'
- html = s.get(clanUrl)
- html = html.text
- soup = BeautifulSoup(html, 'html.parser')
- test = soup.find_all('li')
- ipSplit = test[22].a["href"]
- ip = ipSplit.replace('internet?ip=', '')
- with open("clanIP.txt", "a") as file:
- prep = str(ip)+"\n"
- file.writelines(prep)
- while loop == True:
- attempts = 0
- if register() == True:
- time.sleep(10)
- found = False
- while attempts < 15 and found == False:
- found = emailAccount()
- print(found)
- sleep(2)
- attempts+=1
- print(attempts)
- if attempts == 15:
- print("Email not found --> Re-registering user.")
- continue
- certificate1()
- certificate2()
- btcLogin()
- sellBTC()
- buyInternet()
- clanCreate()
- clanServer()
- clanIP()
- clearClanLog()
- logClear()
- else:
- print("Email in use!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement