forked from OlympicCode/vHackXTBot-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole_linux.py
More file actions
230 lines (209 loc) · 7.73 KB
/
console_linux.py
File metadata and controls
230 lines (209 loc) · 7.73 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#!/usr/bin/python2.7
#-*- coding: utf-8
from classes import API
from classes import IP
from classes import Passwords
from utils import Utils
from ocr import OCR
import time
import json
import subprocess
from PIL import Image
import base64
import pytesseract
import cStringIO
import requests
import re
import concurrent.futures
from random import randint
class Console:
def myinfo(self):
ut = Utils()
temp = ut.requestString("user::::pass::::gcm::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + "eW7lxzLY9bE:APA91bEO2sZd6aibQerL3Uy-wSp3gM7zLs93Xwoj4zIhnyNO8FLyfcODkIRC1dc7kkDymiWxy_dTQ-bXxUUPIhN6jCUBVvGqoNXkeHhRvEtqAtFuYJbknovB_0gItoXiTev7Lc5LJgP2" + "::::" + "userHash_not_needed", "vh_update.php")
return temp
def requestPassword(self,ip):
ut = Utils()
arr = ut.requestArray("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_vulnScan.php")
imgs = Passwords(arr)
return imgs
def enterPassword(self, passwd, target, uhash):
passwd = passwd.split("p")
ut = Utils()
temp = ut.requestString("user::::pass::::port::::target::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(passwd[1].strip()) + "::::" + str(target) + "::::" + str(uhash), "vh_trTransfer.php")
if temp == "10":
return False
else:
return temp
def scanUser(self):
ut = Utils()
arr = ut.requestArray("user::::pass::::", self.api.getUsername() + "::::" + self.api.getPassword() + "::::", "vh_scanHost.php")
return arr
def transferMoney(self, ip):
ut = Utils()
arr = ut.requestArray("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_trTransfer.php")
return arr
def clearLog(self, ip):
ut = Utils()
s = ut.requestString("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_clearAccessLogs.php")
if s == "0":
return True
else:
return False
def uploadSpyware(self, ip):
ut = Utils()
s = ut.requestString("user::::pass::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + ip, "vh_spywareUpload.php")
if s == "0":
return True
else:
return False
def getTournament(self):
ut = Utils()
temp = ut.requestString("user::::pass::::uhash", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + "UserHash_not_needed", "vh_update.php")
if "tournamentActive" in temp:
if not "2" in temp.split('tournamentActive":"')[1].split('"')[0]:
return True
else:
return False
def getIP(self, blank):
ut = Utils()
info = self.myinfo()
try:
info = json.loads(info)
uhash = info['uhash']
except TypeError:
pass
temp = ut.requestString("user::::pass::::uhash::::by", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(uhash) + "::::" + str(randint(0,1)), "vh_getImg.php")
jsons = json.loads(temp)
for i in range(0, len(jsons["data"])):
hostname = str(jsons["data"][i]["hostname"])
imgstring = 'data: image/png;base64,'+jsons["data"][i]['img']
imgstring = imgstring.split('base64,')[-1].strip()
pic = cStringIO.StringIO()
image_string = cStringIO.StringIO(base64.b64decode(imgstring))
image = Image.open(image_string)
# Overlay on white background, see http://stackoverflow.com/a/7911663/1703216
#bg = Image.new("RGB", image.size, (255,255,255))
#bg.paste(image,image)
if "Hatched by the FBI" in pytesseract.image_to_string(image) or "Watched by the FBI" in pytesseract.image_to_string(image):
return 1, hostname
else:
temp = ut.requestString("user::::pass::::uhash::::hostname", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + str(uhash) + "::::" + hostname, "vh_scanHost.php")
try:
jsons = json.loads(temp)
return 0, str(jsons['ipaddress'])
except TypeError:
return 0, 0
#print str(jsons['ipaddress'])
def attackIP(self, ip, max):
ut = Utils()
info = self.myinfo()
info = json.loads(info)
uhash = info['uhash']
temp = ut.requestString("user::::pass::::uhash::::target", self.api.getUsername() + "::::" + self.api.getPassword() + "::::" + uhash + "::::" + ip, "vh_loadRemoteData.php")
jsons = json.loads(temp)
o = OCR()
imgs = o.getSolution(str(temp))
if imgs != None:
try:
user = jsons['username']
winchance = jsons['winchance']
except TypeError:
return False
try:
if not "?" in str(winchance):
fwlevel = jsons['fw']
avlevel = jsons['av']
spamlevel = jsons['spam']
sdklevel = jsons['sdk']
ipsplevel = jsons['sdk']
money = jsons['money']
saving = jsons['savings']
anonymous = jsons['anonymous']
username = jsons['username']
winlo = jsons['winelo']
winchance = jsons['winchance']
spywarelevel = jsons['spyware']
else:
avlevel = "????"
winchance = 0
print "no scan username"
return False
except TypeError:
fwlevel = jsons['fw']
avlevel = jsons['av']
spamlevel = jsons['spam']
sdklevel = jsons['sdk']
ipsplevel = jsons['sdk']
money = jsons['money']
saving = jsons['savings']
anonymous = jsons['anonymous']
username = jsons['username']
winlo = jsons['winelo']
winchance = jsons['winchance']
spywarelevel = jsons['spyware']
if type(winchance) == "int":
if "?" in winchance:
winchance = 0
print "no chance"
return False
if not "?" in str(avlevel):
if int(avlevel) < max and int(winchance) > 75 and str(anonymous) == "YES":
password = self.enterPassword(imgs, ip, uhash)
jsons = json.loads(password)
if password:
try:
if not "?" in str(money) and str(jsons['result']) == 0:
print "\n[TargetIP: " + str(ip) +"]\n\nMade " + "{:11,}".format(int(jsons['amount'])) + " and " + "{:2d}".format(int(jsons['eloch'])) + " Rep." + "\n Antivirus: "+ str(avlevel) + " Firewall: " + str(fwlevel) + " Sdk: " + str(sdklevel) + " TotalMoney: " + "{:11,}".format(int(money)) + "\n YourWinChance: " + str(winchance) + " Anonymous: "+ str(anonymous) +" username: "+ str(username) + " saving: " + str(saving)
return True
else:
print "\n[TargetIP: " + str(ip) + "]\n\nMade " + "{:11,}".format(int(jsons['amount'])) + " and " + "{:2d}".format(int(jsons['eloch'])) + " Rep." + "\n Antivirus: "+ str(avlevel) + " Firewall: " + str(fwlevel) + " Sdk: " + str(sdklevel) + " TotalMoney: " + "{:11,}".format(int(money)) + "\n YourWinChance: " + str(winchance) + " Anonymous: " + str(anonymous) +" username: "+ str(username) + " saving: " + str(saving)
except KeyError:
print "Bad attack"
return False
else:
print "Password Wrong"
return False
else:
#print "\n"
if int(avlevel) > max:
print "Antivir to high " + str(avlevel)
#print "passed"
return False
if int(winchance) < 75:
print "winchance is poor: " + str(winchance)
#print "passed"
return False
if str(anonymous) == "NO":
print "No Anonymous need"
#print "passed"
return False
else:
print avlevel
if len(avlevel) == 4:
print avlevel
print "Cant load User"
return False
else:
print "Scan to low"
return False
else:
print "Password Error"
return False
def attackIP2(self,ip,max):
ut = Utils()
o = OCR(False)
imgs = self.requestPassword(ip)
selection = o.getPassword(imgs)
print selection
def attack(self, amount, max, wait):
with concurrent.futures.ThreadPoolExecutor(max_workers=6) as executor:
for i in range(1,amount):
FBI, ips = self.getIP(True)
if FBI == 0:
lineexec = executor.submit(self.attackIP, ips, max)
print "Waiting..."
time.sleep(wait)
else:
print "Warning FBI Blocking account in " + str(ips) + " I'm not attack"
def __init__(self,api):
self.api = api