Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import json
- from requests.packages.urllib3.exceptions import InsecureRequestWarning
- import string
- from random import *
- import time
- import random
- requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
- avytson = '''
- /$$
- | $$
- /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$
- |____ $$| $$ /$$/| $$ | $$|_ $$_/ /$$_____/ /$$__ $$| $$__ $$
- /$$$$$$$ \ $$/$$/ | $$ | $$ | $$ | $$$$$$ | $$ \ $$| $$ \ $$
- /$$__ $$ \ $$$/ | $$ | $$ | $$ /$$\____ $$| $$ | $$| $$ | $$
- | $$$$$$$ \ $/ | $$$$$$$ | $$$$//$$$$$$$/| $$$$$$/| $$ | $$
- \_______/ \_/ \____ $$ \___/ |_______/ \______/ |__/ |__/
- /$$ | $$
- | $$$$$$/
- \______/
- \n .:|whm domain creator by mostafa elspagh|:.
- .:|https://www.facebook.com/avytson|:.
- .:|mostafaelspagh1@gmail.com|:.
- '''
- print(avytson)
- domains_file = input('؟? Enter Domains file ==> ')
- cp_url = input('؟? Enter Your WHM URL ==> ')
- user = input('؟? Enter Your Username ==> ')
- passwd = input('؟? Enter Your Password ==> ')
- pack = input('؟? Enter the Package ==> ')
- cp_passwd = input("؟? Enter Cpanal Password ==> ")
- mail= input('؟? Enter Mail ==> ')
- req_data = 'user='+user+'&pass='+passwd+'&goto_uri=%2F'
- req = requests.post(cp_url+'/login/?login_only=1', data=req_data,verify=False)
- req_src = req.text
- if 'redirect' and 'security_token' in req_src:
- sectoken = req_src.split('"security_token":"')[1].split('"')[0]
- red = req_src.split('"redirect":"')[1].split('"')[0]
- red = cp_url+red
- setted = req.headers['Set-Cookie']
- whostmgrsession = setted.split('whostmgrsession=')[1].split(';')[0]
- time_zone = 'Africa/Cairo'
- cookie = 'timezone='+time_zone+'; whostmgrsession='+whostmgrsession
- main_headers = {
- 'cookie': cookie
- }
- log_req = requests.post(red, headers=main_headers,verify=False)
- log_src = str(log_req.content)
- if 'Plugins' in log_src or red in log_req.url:
- print ('\n.:| Logged In |:.')
- create_url = cp_url+sectoken+'/scripts5/wwwacct'
- cpage_req = requests.post(create_url, headers=main_headers,verify=False)
- cpage_src = str(cpage_req.content)
- if 'Create a New Account' in cpage_src:
- print ('\n.:| Starting Creating |:.')
- for line in open(domains_file,'r').readlines():
- domain = line.strip()
- cp_user = ''.join(random.choice(string.digits + string.ascii_lowercase) for _ in range(10))
- xcp_passwd = str(cp_passwd)+str(random.randint(00,99))
- cpcreate_data = 'sign=&plan='+pack+'&domain='+domain+'&username='+cp_user+'&password='+xcp_passwd+'&contactemail='+mail+'&dbuser='+cp_user+'&msel=n%2Cy%2C10240%2C%2Cpaper_lantern%2C0%2C0%2C0%2C0%2C0%2C1048576%2Cn%2C0%2C0%2Cdefault%2Cen%2C%2C%2C%2Cn%2C1024%2Caarotfkx_default&cgi=1&language=en&spamassassin=1&hasuseregns=1&mxcheck=local'
- cpcreate_req = requests.post(create_url, data=cpcreate_data, headers=main_headers,verify=False)
- cpcreate_src = str(cpcreate_req.content)
- if 'Account Creation Status: ok (Account Creation Ok)' in cpcreate_src:
- print ('\n[X] CREATED CPANEL SUCCESSFULLY [https://'+domain+':2083|'+cp_user+'|'+xcp_passwd+'] !!')
- with open('CPS.txt','a+')as f:
- f.write('https://'+domain+':2083|'+cp_user+'|'+xcp_passwd+'\n')
- else:
- print ('\n[X] FAILED CREATEING CPANEL [ERROR OR AVAILABLE BEFORE]!!')
- else:
- print ('\n.:| Unexpected Error |:.')
- else:
- print ('.:| Invalid Username Or Password |:.')
- else:
- print ('.:| Can\'t Reach Whm |:.')
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement