Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. import requests
  2. import json
  3. from requests.packages.urllib3.exceptions import InsecureRequestWarning
  4. import string
  5. from random import *
  6. import time
  7. import random
  8.  
  9. requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
  10. avytson = '''
  11. /$$
  12. | $$
  13. /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$
  14. |____ $$| $$ /$$/| $$ | $$|_ $$_/ /$$_____/ /$$__ $$| $$__ $$
  15. /$$$$$$$ \ $$/$$/ | $$ | $$ | $$ | $$$$$$ | $$ \ $$| $$ \ $$
  16. /$$__ $$ \ $$$/ | $$ | $$ | $$ /$$\____ $$| $$ | $$| $$ | $$
  17. | $$$$$$$ \ $/ | $$$$$$$ | $$$$//$$$$$$$/| $$$$$$/| $$ | $$
  18. \_______/ \_/ \____ $$ \___/ |_______/ \______/ |__/ |__/
  19. /$$ | $$
  20. | $$$$$$/
  21. \______/
  22.  
  23. \n .:|whm domain creator by mostafa elspagh|:.
  24. .:|https://www.facebook.com/avytson|:.
  25. .:|mostafaelspagh1@gmail.com|:.
  26. '''
  27. print(avytson)
  28.  
  29.  
  30.  
  31. domains_file = input('؟? Enter Domains file ==> ')
  32. cp_url = input('؟? Enter Your WHM URL ==> ')
  33. user = input('؟? Enter Your Username ==> ')
  34. passwd = input('؟? Enter Your Password ==> ')
  35. pack = input('؟? Enter the Package ==> ')
  36. cp_passwd = input("؟? Enter Cpanal Password ==> ")
  37. mail= input('؟? Enter Mail ==> ')
  38. req_data = 'user='+user+'&pass='+passwd+'&goto_uri=%2F'
  39. req = requests.post(cp_url+'/login/?login_only=1', data=req_data,verify=False)
  40. req_src = req.text
  41. if 'redirect' and 'security_token' in req_src:
  42. sectoken = req_src.split('"security_token":"')[1].split('"')[0]
  43. red = req_src.split('"redirect":"')[1].split('"')[0]
  44. red = cp_url+red
  45. setted = req.headers['Set-Cookie']
  46. whostmgrsession = setted.split('whostmgrsession=')[1].split(';')[0]
  47. time_zone = 'Africa/Cairo'
  48. cookie = 'timezone='+time_zone+'; whostmgrsession='+whostmgrsession
  49. main_headers = {
  50. 'cookie': cookie
  51. }
  52. log_req = requests.post(red, headers=main_headers,verify=False)
  53. log_src = str(log_req.content)
  54. if 'Plugins' in log_src or red in log_req.url:
  55. print ('\n.:| Logged In |:.')
  56. create_url = cp_url+sectoken+'/scripts5/wwwacct'
  57. cpage_req = requests.post(create_url, headers=main_headers,verify=False)
  58. cpage_src = str(cpage_req.content)
  59. if 'Create a New Account' in cpage_src:
  60. print ('\n.:| Starting Creating |:.')
  61. for line in open(domains_file,'r').readlines():
  62. domain = line.strip()
  63. cp_user = ''.join(random.choice(string.digits + string.ascii_lowercase) for _ in range(10))
  64. xcp_passwd = str(cp_passwd)+str(random.randint(00,99))
  65. 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'
  66. cpcreate_req = requests.post(create_url, data=cpcreate_data, headers=main_headers,verify=False)
  67. cpcreate_src = str(cpcreate_req.content)
  68. if 'Account Creation Status: ok (Account Creation Ok)' in cpcreate_src:
  69. print ('\n[X] CREATED CPANEL SUCCESSFULLY [https://'+domain+':2083|'+cp_user+'|'+xcp_passwd+'] !!')
  70. with open('CPS.txt','a+')as f:
  71. f.write('https://'+domain+':2083|'+cp_user+'|'+xcp_passwd+'\n')
  72. else:
  73. print ('\n[X] FAILED CREATEING CPANEL [ERROR OR AVAILABLE BEFORE]!!')
  74. else:
  75. print ('\n.:| Unexpected Error |:.')
  76. else:
  77. print ('.:| Invalid Username Or Password |:.')
  78. else:
  79. print ('.:| Can\'t Reach Whm |:.')
  80. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement