vHackOSPython

Main.py

Aug 23rd, 2018
1,299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.94 KB | None | 0 0
  1. #v1.60.5
  2. import socket
  3. import base64
  4. import ssl
  5. import hashlib
  6. import time
  7. import random
  8. import urllib.request
  9. import datetime
  10. import androidhelper
  11. import threading
  12. droid = androidhelper.Android()
  13.  
  14. Targets = []
  15. try:
  16. with open("/sdcard/qpython/Targets.txt","r") as file:
  17. for i in file.read().split("\n"):
  18. i = i.split("|")
  19. if len(i) > 1: Targets += [i]
  20. except:
  21. print("Error targets base")
  22. exit(0)
  23.  
  24. TargetN = "%&$#"
  25. if TargetN == "%&"+"$#":
  26. print("Please start vHackOSCore.py !!! -_-")
  27. exit(1)
  28. Target = Targets[int(TargetN)]
  29. Wall = "%&&$" == "True"
  30. Apps = "$%&$"
  31.  
  32. Name = Target[0]
  33. ID = Target[1]
  34. lang = "ru"
  35. accessToken = Target[2]
  36.  
  37. user2 = '{"uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  38.  
  39. Vars = (
  40. "/mobile/32",
  41. )
  42. Paths = (
  43. Vars[0]+"/update.php",#0
  44. Vars[0]+"/crew.php",
  45. Vars[0]+"/mwk.php",
  46. Vars[0]+"/server.php",
  47. Vars[0]+"/mining.php",
  48. Vars[0]+"/messenger.php",#5
  49. Vars[0]+"/tasks.php",
  50. Vars[0]+"/exploit.php",
  51. Vars[0]+"/remotebanking.php",
  52. Vars[0]+"/remotelog.php",
  53. Vars[0]+"/network.php",#10
  54. Vars[0]+"/remote.php",
  55. Vars[0]+"/startbruteforce.php",
  56. Vars[0]+"/missions.php",
  57. Vars[0]+"/store.php",
  58. Vars[0]+"/buy.php",#15
  59. Vars[0]+"/ranking.php",
  60. )
  61. Opisanie = (
  62. "\n1.) Буфер на сетькоины, что бы автоапгрейдер не тратил всё"+
  63. "\n2.) Тег клана"+
  64. "\n3.) Вибрация во время атаки на банк сетькоинов"+
  65. "\n4.) Перезапускать ли бота?"+
  66. "\n5.) Количество опыта нужное соклану, для выполнения норматива"+
  67. "\n6.) Нужно ли использовать битву серверов?"
  68. )
  69.  
  70. SimInt = "0123456789"
  71. SimChr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  72. def JSONencoder(strr,Sim,Re):
  73. def StrRead(strr,Sim):
  74. Sim += 1
  75. Date = ""
  76. while strr[Sim] != '"':
  77. Date += strr[Sim]
  78. Sim += 1
  79. while strr[Sim] == '\\' and strr[Sim+1] == '"':
  80. Date += '\\"'
  81. Sim += 2
  82. return Sim, Date
  83. if Re: Ex = []
  84. else: Ex = {}
  85. Raz = 0
  86. Zn = 0
  87. while True:
  88. if strr[Sim] in ["}","]"]: return Ex, Sim
  89. elif strr[Sim] in ["{","["]:
  90. Conv = strr[Sim] == "["
  91. if Re:
  92. Dat, Sim = JSONencoder(strr,Sim+1,Conv)
  93. Ex += [Dat]
  94. else: Ex[Key], Sim = JSONencoder(strr,Sim+1,Conv)
  95. Raz = 0
  96. elif Re:
  97. if Raz == 0:
  98. if strr[Sim] == '"':
  99. Sim, Dat = StrRead(strr,Sim)
  100. Ex += [Dat]
  101. Raz = 1
  102. elif strr[Sim] in SimInt:
  103. Zn = Zn*10+ord(strr[Sim])-48
  104. if strr[Sim+1] in ["]",","]:
  105. Ex += [Zn]
  106. Zn = 0
  107. Raz = 1
  108. elif strr[Sim] in SimChr: Zn = 0
  109. elif strr[Sim] == ',' and Raz == 1: Raz = 0
  110. else:
  111. if strr[Sim] == '"' and Raz == 0:
  112. Zn = 0
  113. Sim, Key = StrRead(strr,Sim)
  114. while strr[Sim] != ':': Sim += 1
  115. Raz = 1
  116. elif Raz == 1:
  117. if strr[Sim] == '"':
  118. Sim, Zn = StrRead(strr,Sim)
  119. Ex[Key] = Zn
  120. Raz = 2
  121. elif strr[Sim] in SimInt:
  122. Zn = Zn*10+ord(strr[Sim])-48
  123. elif strr[Sim] in SimChr: Zn = 0
  124. elif strr[Sim] == ',':
  125. Ex[Key] = Zn
  126. Raz = 0
  127. elif Raz == 2 and strr[Sim] == ',': Raz = 0
  128. Sim += 1
  129. def b64encoder(str):
  130. str = base64.b64encode((str).encode("utf-8"))
  131. while str[-1]==61: str = str[:len(str)-1]
  132. return str.decode("utf-8")
  133. def MD5(str):
  134. m = hashlib.md5()
  135. m.update(str.encode("utf-8"))
  136. return m.hexdigest()
  137. def getPass(str):
  138. return MD5(str+str+MD5(str))
  139. def generator(sAddr,str):
  140. return ("GET "+sAddr+"?user="+b64encoder(str)+"&pass="+getPass(str)+" HTTP/1.1\nUser-Agent: Curator/1.6.0 (Linux; U; Android 5.6; thl T6S Build/KOT49H)\nHost: api.vhack.cc\nConnection: Keep-Alive\nAccept-Encoding: gzip\n\n").encode("utf-8")
  141. aRaz = 0
  142. def request(sAddr,strJ):
  143. global Pong
  144. global aRaz
  145. time.sleep(random.random()*0.3+0.2)
  146. gSock.send(generator(sAddr,strJ))
  147. Raz = False
  148. re = 0
  149. strr = ""
  150. while True:
  151. while True:
  152. try:
  153. mes = gSock.recv(100000)
  154. mess = mes.decode("utf-8").split("\r\n")
  155. if len(mess)>2: break
  156. print("PingPong...")
  157. SocketCreator()
  158. gSock.send(generator(sAddr,strJ))
  159. except:
  160. print("rewriting")
  161. re += 1
  162. if re == 8: gSock.send(generator(sAddr,strJ))
  163. if re == 15:
  164. Auth()
  165. Error = 1/0
  166. for i in mess:
  167. if len(i)>0:
  168. if i[0]=="{": Raz = True
  169. if Raz and i!="": strr += i
  170. mess = mess[::-1]
  171. try:
  172. sos = str(int(mess[3]))
  173. except:
  174. sos = mess[2]
  175. if sos == "0": break
  176. while strr.count("null")>0:
  177. strr = strr.replace("null","None")
  178. strr = JSONencoder(strr,1,False)[0]
  179. if "result" in strr:
  180. if strr["result"] == "10":
  181. print("Error pass/address:")
  182. print(" Address: "+sAddr)
  183. print(" stringJSON: "+strJ)
  184. print(" Date: "+str(strr))
  185. time.sleep(10000)
  186. if strr["result"] == "36":
  187. print("Error accessToken:")
  188. print(" AccessToken: "+accessToken)
  189. print(" Address: "+sAddr)
  190. print(" stringJSON: "+strJ)
  191. time.sleep(10000)
  192. aRaz = 0
  193. return strr
  194.  
  195. def reqAction(sAddr,action):
  196. Zn = '{"action":"'+str(action)+'","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  197. return request(sAddr,Zn)
  198.  
  199. def Heist():
  200. StrV = {}
  201. if not Upd[1]: return
  202. res = request(Paths[3],user2)
  203. print("HEIST STARTED!")
  204. if Values[2] == "1":
  205. for i in range(25):
  206. droid.vibrate(40)
  207. time.sleep(0.1)
  208. conn = socket.socket()
  209. conn.connect(("51.255.93.109",35401))
  210. conn.send(b64encoder(":LOGIN::"+ID+"::"+accessToken).encode("utf-8"))
  211. print(conn.recv(1024).decode("utf-8"))
  212. S = 0
  213. L = 0
  214. Raz = True
  215. Ex = True
  216. Players = {}
  217. Max = 0
  218. End = ""
  219. while Ex:
  220. L += 1
  221. for mes in conn.recv(1024).decode("utf-8").replace("\r\n","\n").split("\n"):
  222. if len(mes) > 0:
  223. mes2 = mes.split(" ")
  224. if mes2[0] == "--NEWS":
  225. S += 1
  226. print("0"*(6-len(str(L)))+str(L)+"..."+"0"*(6-len(str(S)))+str(S)+":")
  227. print(mes[7:])
  228. StrV[mes2[3][mes2[3].index(".")+1]] = mes2[7]
  229. if End == "":
  230. if mes2[1] in Players: Players[mes2[1]] += 1
  231. else: Players[mes2[1]] = 1
  232. Max = max(Max,Players[mes2[1]])
  233. if mes2[1] == Name:
  234. print(" Hit?")
  235. Raz = True
  236. elif mes2[0] == "--STATUS":
  237. if mes2[1] == "0":
  238. Ex = False
  239. End = "Bank Time ended ;'-{"
  240. conn.send(b64encoder(":QUIT").encode("utf-8"))
  241. break
  242. elif mes2[1] == "1":
  243. print(" Bank AV: "+mes2[3]+"%")
  244. print(" Time: "+str(int(mes2[2]) // 60)+":"+str(int(mes2[2]) % 60))
  245. try:
  246. print(" Delta: "+str(round(int(mes2[2])/18/int(mes2[3])*100))+"%")
  247. except: print(" Delta: ∞")
  248. print(" BandWidth: "+mes2[4]+"%")
  249. print(" Reward frags: "+mes2[6])
  250. if int(mes2[4]) >= 30 and Raz:
  251. print(" Hit!")
  252. conn.send(b64encoder(":HIT").encode("utf-8"))
  253. Raz = False
  254. elif mes2[1] == "2":
  255. End = (" Last hit by: "+mes2[2]+
  256. "\n My rang: "+mes2[3]+
  257. "\n Reward: "+mes2[4]+" NetCoins")
  258. conn.send(b64encoder(":QUIT").encode("utf-8"))
  259. elif mes2[0] == "--BYE":
  260. print(End)
  261. Ex = False
  262. break
  263. print("Module heister ended")
  264. with open("/sdcard/qpython/bankNC/"+Name+" "+str(datetime.datetime.now()).replace(":","-")+".txt","w") as file:
  265. for i in range(0,Max+1):
  266. i = Max - i
  267. for key in Players.copy():
  268. if Players[key] == i:
  269. file.write(key+": "+str(i)+"\n")
  270. Players.pop(key)
  271. file.write(str(Players)+"\n"+End)
  272. print("DataSave")
  273. #for i in StrV: print(i+": "+StrV[i])
  274. conn.close()
  275. Update()
  276.  
  277. aSock = 0
  278. def Auth():
  279. global aSock
  280. aSock = socket.socket()
  281. aSock.connect(("54.37.205.154",7531))
  282. aSock.send(("NICK "+Name+"\nUSER "+ID+" 0 * :vHack.mobile User\n").encode("utf-8"))
  283. mes = ""
  284. J = 0
  285. while mes=="":
  286. J += 1
  287. if J >= 100:
  288. print("AUTH ERROR")
  289. Error = 1 / 0
  290. print("*"*24)
  291. message = aSock.recv(10000).decode("utf-8").split("\n")
  292. for i in message:
  293. print("->"+i)
  294. if i.count("Reconnecting too fast") > 0:
  295. print("Reconnecting too fast, Sleep 45")
  296. time.sleep(45)
  297. Auth()
  298. return
  299. if i.count("Nickname is already in use.") > 0:
  300. aSock.send(("NICK "+Name+"_\n").encode("utf-8"))
  301. break
  302. if i[:4]=="PING":
  303. mes = "PONG"+i[4:]+"\n"
  304. break
  305. print(mes)
  306. aSock.send(mes.encode("utf-8"))
  307. aSock.send(("PRIVMSG vMobileGuard :.letmein "+ID+" "+accessToken+" ru\n").encode("utf-8"))
  308. message = aSock.recv(10000).decode("utf-8")
  309. print("*"*24)
  310. print(message.split("\n")[0])
  311.  
  312. def AutoBan(gmtime,test):
  313. def Ban(name):
  314. if test:
  315. IncList(name,"black")
  316. print(" "+name+": banned (NO), id: "+i["user_id"])
  317. else:
  318. if int(res["myposition"]) > int(i["position"]):
  319. Zn = '{"action":"2500","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'","target_id":"'+i["user_id"]+'"}'
  320. Zn = request(Paths[1],Zn)
  321. if Zn["kicked"] == "1":
  322. IncList(name,"black")
  323. print(" "+name+": banned :/ , id: "+i["user_id"])
  324. def InList(name,color):
  325. return name in ban[color+"list"]
  326. def IncList(name,color):
  327. if InList(name,color): ban[color+"list"][name] += 1
  328. else: ban[color+"list"][name] = 1
  329. def DecList(name,color):
  330. if InList(name,color):
  331. ban[color+"list"][name] -= 1
  332. if ban[color+"list"][name] <= 0: PopList(name,color)
  333. def PopList(name,color):
  334. if InList(name,color):
  335. ban[color+"list"].pop(name)
  336. print(" "+name+": pop in "+color+"list")
  337. def PoperList(names,color):
  338. for name in ban[color+"list"].copy():
  339. if not name in names: PopList(name,color)
  340. if not ABRaz: return
  341. if gmtime.tm_hour != 21 and not test: return
  342. try:
  343. with open("/sdcard/qpython/BanList.txt","r") as file: ban = eval(file.read())
  344. except:
  345. print(" *New banlist created")
  346. ban = {"days":[],"blacklist":{},"redlist":{},"greenlist":{},"whitelist":[]}
  347. day = gmtime.tm_year * 1000 + gmtime.tm_yday
  348. if day in ban["days"] and not test: return
  349. print("AUTOBAN STARTED!")
  350. if test: print("*THIS IS A TEST")
  351. ban["days"] += [day]
  352. res = request(Paths[1],user2)
  353. if res["ismember"] != "1": return
  354. Members = []
  355. Banned = "Autoban status:"
  356. for i in res["members"]:
  357. name = i["username"]
  358. Members += [name]
  359. if InList(name,"black") and InList(name,"white"):
  360. print(" "+name+": black/white listing :/")
  361. PopList(Name,"black")
  362. ban["whitelist"].remove(name)
  363. if InList(name,"white"):
  364. for color in ["black","red","green"]: PopList(name,color)
  365. if InList(name,"black"):
  366. if ban["blacklist"][name] >= 2:
  367. Ban(name)
  368. Banned += "\\n "+name+" banned "+str(ban["blacklist"]["name"])+" time (danger)"
  369. Members.remove(name)
  370. continue
  371. if not InList(name,"white"):
  372. if InList(name,"green"):
  373. PopList(name,"red")
  374. DecList(name,"green")
  375. print(" "+name+": delay "+str(ban["greenlist"][name])+" days")
  376. if ban["greenlist"][name] <= 0: PopList(name,"green")
  377. else:
  378. if int(i["repearned"]) < int(Values[4]):
  379. print(" "+name+": not normative")
  380. IncList(name,"red")
  381. print(" "+name+": value redlist: "+str(ban["redlist"][name]))
  382. if ban["redlist"][name] >= 2:
  383. PopList(name,"red")
  384. Ban(name)
  385. Banned += "\\n "+name+" banned "+str(ban["blacklist"][name])+" time "
  386. if ban["blacklist"][name] >= 1: Banned += "(irrevocably)"
  387. else: Banned += "(recurrently)"
  388. Members.remove(name)
  389. else: DecList(name,"red")
  390. PoperList(Members,"red")
  391. PoperList(Members,"green")
  392. if test: add = "Test"
  393. else: add = ""
  394. with open("/sdcard/qpython/BanList"+add+".txt","w") as file: file.write(str(ban))
  395. Update()
  396. print(" printed:\n "+Banned)
  397. if not test:
  398. print(" Saying...")
  399. res = request(Paths[1],user2)
  400. say = '{"message":"'+Banned+'","action":"1000","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'"}'
  401. res = request(Paths[1],say)
  402. print(" Result: "+res["result"])
  403. Update()
  404. print("AUTOBAN FINISHED!")
  405.  
  406. def Log(ArrName,type,key,value):
  407. try:
  408. with open("/sdcard/qpython/LogArr.txt","r") as file: Arr = eval(file.read())
  409. except:
  410. print("New LogArr.txt!")
  411. Arr = {}
  412. if not ArrName in Arr:
  413. print("New arr: "+ArrName+" type: "+str(type)+" with LogArr.txt")
  414. if type == 0: Arr[ArrName] = {}
  415. elif type == 1: Arr[ArrName] = []
  416. if type == 2: Arr[ArrName] = value
  417. if type == 0: Arr[ArrName][key] = value
  418. elif type == 1:
  419. if not value in Arr[ArrName]: Arr[ArrName] += [value]
  420. with open("/sdcard/qpython/LogArr.txt","w") as file: file.write(str(Arr))
  421.  
  422. Tumb = 0
  423. Tumb2 = 0
  424. NC = 0
  425. SDK = 0
  426. Upd = [False,False,False,False] #MWK,Server,Miner,Crew
  427. def Update():
  428. global colExp
  429. global Tumb
  430. global Tumb2
  431. global SDK
  432. global NC
  433. global Upd
  434. Zn = '{"lastread":"0","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'","notify":"1"}'
  435. res = request(Paths[0],Zn)
  436. AutoBan(time.gmtime(time.time()),False)
  437. SDK = int(res["sdk"])
  438. NC = int(res["netcoins"])
  439. if res["heist"] == "1": Heist()
  440. Upd = [res["mwk"]=="1",res["server"]=="1",res["miner"]=="1",res["crew"]=="1"]
  441. if Tumb == 0:
  442. Tumb = int(res["expreq"])
  443. Tumb2 = int(res["exp"])
  444. else:
  445. if Tumb != int(res["expreq"]):
  446. colExp += Tumb - Tumb2
  447. Tumb2 = 0
  448. Tumb = int(res["expreq"])
  449. colExp += int(res["exp"]) - Tumb2
  450. Tumb2 = int(res["exp"])
  451. Log("ExpReq",0,res["level"],res["expreq"])
  452. Log("Inet",1,None,res["inet"])
  453. return ("*"*24+
  454. "\nUser: "+res["username"]+
  455. "\nLevel: "+res["level"]+" ("+res["exp"]+"/"+res["expreq"]+")"+
  456. "\nMoney: "+res["money"]+" netcoins: "+res["netcoins"]+
  457. "\nExploits: "+res["exploits"]+
  458. "\nInet: "+res["inet"]+
  459. "\nIp: "+res["ipaddress"]+
  460. "\nSdk: "+res["sdk"]+
  461. "\nBrute: "+res["brute"]+
  462. "\nNow: "+str(datetime.datetime.now())+
  463. "\n"+"*"*24
  464. )
  465.  
  466. SayBuffer = []
  467. def NotMemberCrew():
  468. global SayBuffer
  469. req = 0
  470. while req == 0:
  471. print(" Not crew :/")
  472. Zn = '{"action":"100","uid":"'+ID+'","crew_tag":"'+Values[1]+'","accesstoken":"'+accessToken+'","lang":"'+lang+'"}'
  473. res = request(Paths[1],Zn)
  474. req = int(res["requested"])
  475. if req == 1: print(" requested")
  476. elif req == 2: print(" crew full :/")
  477. elif req == 3: print(" crew not found")
  478. elif req == 5: print(" requested... loop")
  479. else: print(" Error, req = "+str(req))
  480. if SayBuffer[0] != "3A4EM BbI MEHya KiKHYli? ;'-{":
  481. SayBuffer = ["3A4EM BbI MEHya KiKHYli? ;'-{"] + SayBuffer
  482. print(" One say add")
  483. def Chat(message):
  484. print("Chat")
  485. print(" Say: "+message)
  486. try:
  487. with open("/sdcard/qpython/LogBot.txt","a") as file: file.write(message+"\n")
  488. except:
  489. print("New LogBot.txt started")
  490. with open("/sdcard/qpython/LogBot.txt","w") as file: file.write(message+"\n")
  491.  
  492. def MWK():
  493. global colMWK
  494. res = request(Paths[2],user2)
  495. print("MWK:")
  496. if res["banklog_running"]=="0":
  497. print(" MWK started")
  498. res = reqAction(Paths[2],100)
  499. colMWK += 1
  500. print(" MalverKits: "+res["mwReady"])
  501. Update()
  502. return res["banklog_left"]
  503.  
  504. def Server():
  505. def MaxV():
  506. Min = 1000
  507. for i in range(3):
  508. Vers = int(res[arr[i]+"_version"][1:])
  509. if Vers < Min:
  510. Min = Vers
  511. MinZn = str(i+1)
  512. MinStr = arr[i]
  513. #if res["smash_upgrade_costs"] != "0":
  514. # MinZn = "1"
  515. # MinStr = "smash"
  516. return MinZn,MinStr
  517. global colServer
  518. global colAV
  519. global colFW
  520. global colFrags
  521. global colBoosters
  522. res = request(Paths[3],user2)
  523. print("Server:")
  524. if int(res["packs"]) >= 10:
  525. res = reqAction(Paths[3],2000)
  526. if res["sPackOpenAll"] == "1":
  527. print(" Collected:")
  528. # print(" Server: "+str(res["sServer"]))
  529. # print(" AntiVirus: "+str(res["sAV"]))
  530. # print(" FireWall: "+str(res["sFW"]))
  531. print(" Boosters: "+str(res["sBoost"]))
  532. print(" Frags: "+str(res["sFrags"]))
  533. # colServer += res["sServer"]
  534. # colAV += res["sAV"]
  535. # colFW += res["sFW"]
  536. colFrags += res["sFrags"]
  537. colBoosters += res["sBoost"]
  538. # for node in [["av","AntiVirus",100,"1"],["fw","FireWall",200,"2"]]:
  539. # if res[node[0]+"nodes"] != "3":
  540. # print(" I'm saving "+node[1]+" pieces on node")
  541. # if int(res[node[0]+"_pieces"]) >= 100:
  542. # print(" Open "+node[1]+" node...")
  543. # res = reqAction(Paths[3],node[2])
  544. # if res[node[0]+"added"]: print(" "+node[1]+" node opened!")
  545. # else: print(" Error open "+node[1]+" node")
  546. # else:
  547. # Min = 1000000
  548. # for i in range(3):
  549. # J = int(res[node[0]+str(i+1)+"_str_max"])
  550. # if Min > J:
  551. # Min = J
  552. # N = str(i+1)
  553. # Zn = '{"node_number":"'+N+'","action":"1818","uid":"'+ID+'","accesstoken":"'+accessToken+'","node_type":"'+node[3]+'","lang":"'+lang+'"}'
  554. # res = request(Paths[3],Zn)
  555. # if res["node_updated"] == "1": print(" Node "+node[1]+" Number "+N+" updated")
  556. # Zn = '{"node_number":"1","action":"1818","uid":"'+ID+'","accesstoken":"'+accessToken+'","node_type":"0","lang":"'+lang+'"}'
  557. # res = request(Paths[3],Zn)
  558. # if res["node_updated"] == "1": print(" Node Server updated")
  559. print(" Open BronzePacks:")
  560. while res["bronze_packs"] != "0":
  561. res = reqAction(Paths[3],5200)
  562. if res["sBronzeOpen"] == "1": print(" -1 BronzePack, Collected: "+res["sHowMuch"]+" frags")
  563. else: print(" Open error")
  564. arr = ["smash","bypass","shutdown"]
  565. MinZn,MinStr = MaxV()
  566. print(" Veapon upgade: "+MinStr.capitalize()+" (Type: "+MinZn+")")
  567. while int(res["frags"]) >= 5:
  568. if int(res["frags"]) >= 50 and int(res[MinStr+"_scripts"])+50 <= int(res[MinStr+"_upgrade_costs"]): Count = 10
  569. else: Count = 1
  570. Zn = '{"action":"7070","uid":"'+ID+'","accesstoken":"'+accessToken+'","count":"'+str(Count)+'","type":"'+MinZn+'","lang":"'+lang+'"}'
  571. res = request(Paths[3],Zn)
  572. if res[MinStr+"_created"] == "1": print(" Use "+str(Count*5)+" frags, scripts: "+res[MinStr+"_scripts"])
  573. else: print(" Script "+MinZn+" error!")
  574. while int(res[MinStr+"_scripts"]) >= int(res[MinStr+"_upgrade_costs"]) and res[MinStr+"_upgrade_costs"] != "0":
  575. Zn = '{"action":"6868","uid":"'+ID+'","accesstoken":"'+accessToken+'","type":"'+MinZn+'","lang":"'+lang+'"}'
  576. res = request(Paths[3],Zn)
  577. if res[MinStr+"_upgraded"] == "1": print(" "+MinStr.capitalize()+" upgraded, level: "+res[MinStr+"_version"])
  578. else: print(" Veapon "+MinZn+" error!")
  579. MinZn,MinStr = MaxV()
  580. print(" Pieces:")
  581. # print(" Server: "+res["server_pieces"])
  582. # print(" AntiVirus: "+res["av_pieces"])
  583. # print(" FireWall: "+res["fw_pieces"])
  584. print(" Frags: "+res["frags"])
  585. for i in arr:
  586. print(" "+i.capitalize()+":")
  587. print(" Version: "+res[i+"_version"])
  588. print(" Strength: "+res[i+"_str"])
  589. print(" BW Costs: "+res[i+"_costs"])
  590. print(" Scripts: "+res[i+"_scripts"])
  591. print(" Upgrade costs: "+res[i+"_upgrade_costs"])
  592. print(" Packs: "+res["packs"])
  593. print(" NextPackin: "+res["nextpackin"])
  594. print(" BronzePacks: "+res["bronze_packs"])
  595. print(" 1vs1:")
  596. print(" Can: "+str(res["can_1on1"] == "1"))
  597. print(" Rep: "+res["myrep"])
  598. print(" Winrate: "+res["winrate"])
  599. print(" League: "+res["myleague"])
  600. Update()
  601. return int(res["nextpackin"])+(9-int(res["packs"]))*300
  602.  
  603. def Mining():
  604. global colNetCoins
  605. res = request(Paths[4],user2)
  606. print("Miner:")
  607. if res["running"] == "2":
  608. colNetCoins += int(res["mined"])
  609. print(" Mined: "+res["mined"])
  610. res = reqAction(Paths[4],200)
  611. if res["running"] == "0":
  612. print(" Miner started")
  613. res = reqAction(Paths[4],100)
  614. if res["running"] == "1":
  615. Update()
  616. return(res["left"])
  617. exit(1)
  618.  
  619. def FriendsAccept():
  620. res = reqAction(Paths[5],100)
  621. if "convos" in res:
  622. for i in res["convos"]:
  623. if "request" in i:
  624. if i["request"] == "1":
  625. NameP = i["with"]
  626. Zn = '{"action":"888","uid":"'+ID+'","partner_id":"'+i["with_id"]+'","accesstoken":"'+accessToken+'","decision":"0","lang":"'+lang+'"}'
  627. res = request(Paths[5],Zn)
  628. if res["result"] == "0": print("Partner "+NameP+" added!")
  629. Update()
  630.  
  631. def Hacking(ipT,exploit):
  632. global colMoney
  633. global IPBase
  634. Zn = '{"target":"'+ipT+'","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  635. if exploit:
  636. res = request(Paths[7],Zn)
  637. if res["connectionCount"] == "0":
  638. print(" *exploit error!")
  639. return "_error_"
  640. try:
  641. res = request(Paths[11],Zn)
  642. except:
  643. while True:
  644. res = request(Paths[9],Zn)
  645. if res["result"]=="2": break
  646. else: print(" *Restart remotelog! Ip: "+ipT+", Result: "+res["result"])
  647. print(" Log cleared")
  648. return "_ERROR_"
  649. NameT = res["remoteUsername"]
  650. print(" Name: "+NameT)
  651. if res["can_deface"] == "1":
  652. print(" Deface started")
  653. Zn2 = '{"action":"5000","target":"'+ipT+'","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'"}'
  654. res = request(Paths[11],Zn2)
  655. if res["defaced"] == "1":
  656. print(" Defaced crew: "+res["defaced_by"])
  657. else: print(" No defaced")
  658. res = request(Paths[8],Zn)
  659. if res["open"] == "1":
  660. money = res["remotemoney"]
  661. if int(money)>0:
  662. Zn2 = '{"amount":"'+money+'","action":"100","target":"'+ipT+'","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  663. res = request(Paths[8],Zn2)
  664. print(" Money collected: "+money)
  665. colMoney += int(money)
  666. print(" "+res["transactions"][0]["to_ip"])
  667. if res["transactions"][0]["to_ip"] != "ANONYMOUS":
  668. Zn2 = '{"target":"'+ipT+'","action":"5000","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  669. res = request(Paths[8],Zn2)
  670. print(" *MalwerKit used")
  671. print(" "+res["transactions"][0]["to_ip"])
  672. else: print(" Not money")
  673. else:
  674. res = request(Paths[12],Zn)
  675. print(" Bruting started")
  676. res = request(Paths[9],Zn)
  677. Zn = '{"target":"'+ipT+'","action":"100","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  678. while True:
  679. res = request(Paths[9],Zn)
  680. if res["result"]=="2": break
  681. else: print(" *Restart remotelog! Ip: "+ipT+", Result: "+res["result"])
  682. print(" Log cleared")
  683. return NameT
  684.  
  685. def BruteForceCollector():
  686. J = 0
  687. print("Collector bruts started:")
  688. res = request(Paths[6],user2)
  689. if not "brutes" in res: print(" not brutes")
  690. else:
  691. res = res["brutes"][::-1]
  692. for i in res:
  693. ipT = i["user_ip"]
  694. idBr = i["id"]
  695. print("Ip: "+ipT)
  696. print(" Name: "+i["username"])
  697. print(" Time: "+str(int(i["end"])-int(i["start"])))
  698. if not "result" in i: print(" result error: "+str(i))
  699. else:
  700. if i["result"]=="0": print(" Delay: "+str(int(i["end"])-int(i["now"])))
  701. else:
  702. print(" Sleep: "+str(int(i["now"])-int(i["end"])))
  703. Hacking(ipT,False)
  704. res = request(Paths[6],user2)
  705. Zn = '{"action":"10000","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"ru","updateid":"'+idBr+'"}'
  706. res = request(Paths[6],Zn)
  707. print(" Brute cleared, id: "+idBr)
  708. res = request(Paths[6],user2)
  709. J += 1
  710. if J == 5: break
  711. print("Collector bruts closed")
  712. Update()
  713.  
  714. IPBase = {}
  715. def OpenBase():
  716. global IPBase
  717. try:
  718. with open(pathf, "r") as file:
  719. Zn = file.read().split("\n")
  720. for i in Zn:
  721. i = i.split("|")
  722. if len(i) == 4:
  723. if i[3] == "_No_": Par = None
  724. else: Par = i[3]
  725. IPBase[i[0]] = [i[1],i[2],Par]
  726. except:
  727. IPBase = {}
  728. print("*New IP Base Started!!!")
  729. def SaveBase():
  730. with open(pathf, "w") as file:
  731. for i in IPBase:
  732. Zn = IPBase[i]
  733. if Zn[2] == None: Par = "_No_"
  734. else: Par = Zn[2]
  735. file.write(i+"|"+Zn[0]+"|"+Zn[1]+"|"+Par+"\n")
  736. pathf="/sdcard/qpython/scripts3/IPBase.txt"
  737. OpenBase()
  738.  
  739. def NetWork():
  740. global IPBase
  741. J = 0
  742. print("NetWork hacking started:")
  743. print("*Defaces crew:")
  744. if Upd[3]:
  745. res = request(Paths[1],user2)
  746. if res["ismember"] == "1":
  747. Sl = {}
  748. for i in res["members"]: Sl[i["user_id"]] = i["username"]
  749. Str = "ID участников клана:"
  750. for i in sorted(list(map(int,Sl.keys()))): Str += "\n"+str(i)+": "+Sl[str(i)]
  751. with open("/sdcard/qpython/IDmembers.txt","w") as file: file.write(Str)
  752. Values[1] = res["crew_tag"]
  753. if "requests" in res and res["myposition"] != "1":
  754. for i in res["requests"]:
  755. Raz = "1"
  756. try:
  757. with open("/sdcard/qpython/BanList.txt","r") as file: ban = eval(file.read())
  758. if i["username"] in ban["blacklist"]:
  759. if ban["blacklist"][i["username"]] >= 2: Raz = "0"
  760. finally:
  761. Zn = '{"action":"300","uid":"'+ID+'","accesstoken":"'+accessToken+'","decision":"'+Raz+'","lang":"'+lang+'","target_id":"'+i["user_id"]+'"}'
  762. res = request(Paths[1],Zn)
  763. if res["accepted"] == "1": print(i["username"]+" accepted")
  764. if "defaces" in res:
  765. for i in res["defaces"]:
  766. if i["deface_by"] != Name and i["deface_already_hacked"] == "0" and int(i["deface_time_left"]) > 9 and int(i["deface_fw"]) < SDK:
  767. ipT = i["deface_ip"]
  768. Zn = '{"target":"'+ipT+'","uid":"'+ID+'","lang":"'+lang+'","accesstoken":"'+accessToken+'"}'
  769. res = request(Paths[10],Zn)
  770. print(" Defaced, exploits: "+res["exploits"])
  771. print(" Shans: "+str(J))
  772. print(" Target: "+ipT)
  773. print(" Deface_by: "+i["deface_by"])
  774. print(" FW: "+i["deface_fw"])
  775. if res["exploits"] != "0": Hacking(ipT,True)
  776. else:
  777. res = request(Paths[1],user2)
  778. break
  779. J += 1
  780. res = request(Paths[1],user2)
  781. else:
  782. if len(Values[1]) > 0: NotMemberCrew()
  783. Update()
  784. else: print(" Not app crew")
  785. print("*Defaces targets:")
  786. K = 0
  787. while True:
  788. res = request(Paths[10],user2)
  789. EXPLOITS = res["exploits"]
  790. if int(EXPLOITS)>0:
  791. K += 1
  792. print(" Hacking, exploits: "+res["exploits"]+" ("+str(K)+")")
  793. for i in res["ips"]: IPBase[i["ip"]] = [i["level"],i["fw"],None]
  794. for i in res["ips"]:
  795. if int(i["level"]) <= 10 and int(i["fw"])<SDK and i["open"]=="0":
  796. K = 0
  797. ipT = i["ip"]
  798. print(" Shans: "+str(J))
  799. print(" Target: "+ipT)
  800. print(" Level: "+i["level"])
  801. print(" FW: "+i["fw"])
  802. IPBase[ipT][2] = Hacking(ipT,True)
  803. J += 1
  804. break
  805. else: break
  806. SaveBase()
  807. print("NetWork hacking closed")
  808. Update()
  809. BruteForceCollector()
  810. if int(EXPLOITS)>0: return 45
  811. else: return 300
  812.  
  813. def Missions():
  814. global colBoosters
  815. global colNetCoins
  816. print("Rewards:")
  817. res = request(Paths[13],user2)
  818. if res["claim"] == "1":
  819. res = reqAction(Paths[13],100)
  820. if res["claimed"] == "1":
  821. colBoosters += int(res["rewBoosters"])
  822. colNetCoins += int(res["rewNetCoins"])
  823. print(" DayReward collected")
  824. for daily in range(0,4):
  825. Zn = '{"action":"200","uid":"'+ID+'","accesstoken":"'+accessToken+'","dailyid":"'+str(daily)+'","lang":"'+lang+'"}'
  826. res = request(Paths[13],Zn)
  827. if res["claimed"] == "1":
  828. colBoosters += int(res["rewBoosters"])
  829. colNetCoins += int(res["rewNetCoins"])
  830. print(" Daily"+str(daily)+"Reward collected")
  831. return min(res["claimNextDay"],res["nextDailyReset"])
  832.  
  833. def Pastebin(ID):
  834. try: link = urllib.request.urlopen("https://pastebin.com/raw/"+ID)
  835. except:
  836. print("*Pastebin: ID error")
  837. exit(1)
  838. lines = ""
  839. for i in link.readlines(): lines += i.decode("utf-8")
  840. link.close()
  841. return lines
  842. hash = Name
  843. for i in ["md5","sha1","sha224","sha256","sha384","sha224","sha512","sha1"]:
  844. hash = hash.encode("utf-8")
  845. exec("hash = hashlib."+i+"(hash).hexdigest()")
  846. print("Your hybrid-hash: "+hash)
  847. exec(Pastebin(""))
  848. if hash in Pastebin("2jhrCfVW").split("\r\n"): ABRaz = True
  849. else: ABRaz = False
  850. if ABRaz: print("You dev")
  851. else: print("You not dev")
  852. Log("Targets",2,None,Targets)
  853. vHOSC = "$$%&"
  854. if vHOSC != "vHOSC3":
  855. with open("/sdcard/qpython/scripts3/vDELbot.py","w") as file: file.write(Pastebin("gRyGVWe0"))
  856. print("CORE UPDATED!")
  857. print("Please restart vDELbot.py")
  858. while True: time.sleep(10000)
  859.  
  860. Trat = 0
  861. def Store():
  862. global Apps
  863. global Trat
  864. print("Auto upgrader:")
  865. while True:
  866. res = request(Paths[14],user2)
  867. RazB = int(res["apps"][3]["level"]) >= 101
  868. if RazB:
  869. if ("0" in Apps or Apps == ""): break
  870. else:
  871. print(" This begin upgrades")
  872. Apps = "123456A"
  873. for i in res["apps"]:
  874. if i["level"] == "0" and int(i["require"]) <= int(res["level"]) and int(i["price"]) <= int(res["money"]):
  875. print(" App id: "+i["appid"]+" purchase...")
  876. Zn = '{"action":"200","appcode":"'+i["appid"]+'","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"ru"}'
  877. res = request(Paths[14],Zn)
  878. if res["installed"] == "1": print(" App id: "+i["appid"]+" purchased!")
  879. else: print(" App id: "+i["appid"]+" purchase error :/")
  880. MONEY = res["money"]
  881. print(" Money: "+MONEY)
  882. if res["filled"] == "0":
  883. res = res["apps"]
  884. Min = 1000000
  885. for i in Apps:
  886. if ord(i) >= ord("A") and ord(i) <= ord("Z"): i = ord(i) - ord("A") + 10
  887. else: i = int(i)
  888. Zn = int(res[i]["level"])
  889. if Zn < Min and Zn != 0 and res[i]["price"] != "0":
  890. Min = Zn
  891. app = i
  892. if Min == 1000000:
  893. app = 3
  894. Min = int(res[3]["level"])
  895. res = res[app]
  896. print(" App: "+str(app))
  897. print(" Level: "+str(Min))
  898. if int(res["appid"]) != app:
  899. print("*Error 1")
  900. break
  901. sum = 0
  902. for i in range(10): sum += res["price"] + res["factor"] * i
  903. print(" Price: "+str(sum))
  904. if sum > int(MONEY):
  905. print(" Not money")
  906. break
  907. Zn = '{"action":"5500","appcode":"'+str(app)+'","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'"}'
  908. res = request(Paths[14],Zn)
  909. if res["filled"] == "0":
  910. print("*Error 2")
  911. break
  912. Trat = 0
  913. Update()
  914. res = request(Paths[6],user2)
  915. print(" NetCoins: "+res["netcoins"]+" Boosters: "+res["boosters"])
  916. res["netcoins"] = int(res["netcoins"])
  917. if RazB: res["netcoins"] -= int(Values[0])
  918. res["boosters"] = int(res["boosters"])
  919. if res["netcoins"] <= 0:
  920. print(" Not netcoins")
  921. break
  922. if res["boosters"] <= 0:
  923. print(" Not boosters")
  924. break
  925. coof = max(2.5,res["netcoins"]/res["boosters"])
  926. print(" Coof: "+str(round(coof,2)))
  927. Ex = False
  928. Ex2 = True
  929. while True:
  930. if res["boosters"] == "0":
  931. print(" Not boosters")
  932. Ex = True
  933. break
  934. if res["updateCount"] == "0":
  935. print(" Not updateCounts")
  936. Ex2 = False
  937. break
  938. updateID = res["updates"][0]["id"]
  939. print(" Coof: "+str(round(coof*Trat,2))+" Fin: "+res["finishallcosts"])
  940. if coof * Trat < int(res["finishallcosts"]):
  941. print("-1 boost")
  942. Trat += 1
  943. Zn = '{"action":"888","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'","updateid":"'+updateID+'"}'
  944. res = request(Paths[6],Zn)
  945. res["netcoins"] = int(res["netcoins"])
  946. if RazB: res["netcoins"] -= int(Values[0])
  947. else:
  948. print(" end loop")
  949. if int(res["finishallcosts"]) > res["netcoins"]:
  950. print(" Not netcoins")
  951. Ex = True
  952. break
  953. Zn = '{"action":"500","uid":"'+ID+'","accesstoken":"'+accessToken+'","lang":"'+lang+'","updateid":"'+updateID+'"}'
  954. res = request(Paths[6],Zn)
  955. break
  956. if Ex: break
  957. Trat = 0
  958. if res["finishall"] != "1" and Ex2:
  959. print("*Error 3")
  960. break
  961. Update()
  962. print("End")
  963. Update()
  964.  
  965. gSock = 0
  966. SocketCreated = False
  967. def SocketCreator():
  968. global SocketCreated
  969. global gSock
  970. if SocketCreated: gSock.close()
  971. while True:
  972. try:
  973. sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  974. sock.settimeout(8)
  975. gSock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_SSLv23)
  976. gSock.connect(("51.255.93.109",443))
  977. break
  978. except:
  979. print("*Created Socket error")
  980. time.sleep(0.5)
  981. SocketCreated = True
  982.  
  983. def SaveValues():
  984. try:
  985. with open("/sdcard/qpython/Values.txt","w") as file: file.write("/".join(Values))
  986. except: print("Проблема с файлом: /sdcard/qpython/Values.txt")
  987. Values = []
  988. def OpenValues():
  989. global Values
  990. try:
  991. with open("/sdcard/qpython/Values.txt","r") as file: Values = file.read().split("/")
  992. if Values[0] == "": Values = "3000"
  993. if not Values[2] in ["0","1"]: Values = "1"
  994. if not Values[3] in ["0","1"]: Values = "0"
  995. if Values[4] == "": Values = "100"
  996. if not Values[5] in ["0","1"]: Values = "1"
  997. if Values[6] == "": Values[6] = Opisanie
  998. except:
  999. print("Перезапись файла Values.txt")
  1000. Values = ["3000","","1","0","100","1",Opisanie]
  1001. Rest = Values[3] == "1"
  1002. Values[3] = "0"
  1003. SaveValues()
  1004. if Rest: Restart = 1 / 0
  1005.  
  1006. Pong = False
  1007. TimePong = time.time()
  1008. def PingPong():
  1009. global aSock
  1010. global Pong
  1011. global TimePong
  1012. try:
  1013. while True:
  1014. for message in aSock.recv(1024).decode("utf-8").split("\r\n"):
  1015. mes = message.split(" ")
  1016. if len(mes) > 0:
  1017. if mes[0] == "PING":
  1018. aSock.send(("PONG"+message[4:]+"\r\n").encode("utf-8"))
  1019. print("••••"+message)
  1020. TimePong = time.time()
  1021. except:
  1022. print("•••PING PONG ERROR!")
  1023. Pong = True
  1024.  
  1025. def BuyInet():
  1026. print("Inet:")
  1027. Zn = '{"uid":"'+ID+'","lang":"'+lang+'","info":"1","accesstoken":"'+accessToken+'"}'
  1028. res = request(Paths[15],Zn)
  1029. print(" NextInet: "+res["nextinet"])
  1030. if res["inetcosts"] != "0":
  1031. print(" InetCosts: "+res["inetcosts"])
  1032. if NC >= int(res["inetcosts"]):
  1033. print(" Upgrade inet...")
  1034. res = reqAction(Paths[15],100)
  1035. if res["inetupgaded"] == "1": print(" InetUpgraded!")
  1036. else: print(" Upgrade error :/")
  1037. else: print(" ReqLevelInet: "+res["reqlevelinet"])
  1038. Update()
  1039.  
  1040. def ServerWars():
  1041. def PR(text,size):
  1042. sizeP = (size-len(text))//2
  1043. zn = " "*sizeP+text
  1044. if (size-len(text)) % 2 == 1: sizeP += 1
  1045. return zn + " "*sizeP
  1046. def UseBoosters():
  1047. nonlocal RazB2
  1048. for i in range(5):
  1049. Zn = RazB[i]
  1050. if i == 4 and Zn != "0" or i != 4 and (Zn in ["1","2","3"] or Zn == "4" and RazB1 or Zn == "5" and RazB2):
  1051. if Zn == "5": RazB2 = False
  1052. conn.send(b64encoder(":BOOST "+Zn).encode("utf-8"))
  1053. print("Use boost "+arr2[Zn]+"...")
  1054. break
  1055. res = request(Paths[3],user2)
  1056. print("SERVERWARS STARTED!")
  1057. if res["can_1on1"] != "1":
  1058. print(" Smash < v10 and Bypass < v10 and Shutdown < v10")
  1059. Update()
  1060. return
  1061. Ex = True
  1062. arr = {"1":"FireWall","2":"AntiVirus","3":"Core"}
  1063. arr2 = {"1":"FireWall -10%","2":"AntiVirus -10%","3":"BandWidth +30%","4":"ServerCore -10%","5":"HealthNodes +6%"}
  1064. Str = [0,0,0]
  1065. RazB1 = False #type 4
  1066. RazB2 = False #type 5
  1067. RazB = [0,0,0,0,0]
  1068. try:
  1069. conn = socket.socket()
  1070. conn.connect(("51.255.93.109",35600))
  1071. conn.send(b64encoder(":LOGIN::"+ID+"::"+accessToken).encode("utf-8"))
  1072. print(conn.recv(1024).decode("utf-8"))
  1073. except:
  1074. print("DISCONNECT!")
  1075. Ex = False
  1076. while Ex:
  1077. for mes in conn.recv(1024).decode("utf-8").replace("\r\n","\n").split("\n"):
  1078. if len(mes) > 0:
  1079. mes2 = mes.split(" ")
  1080. if mes2[0] == "--WELCOME": print("Waiting for the opponent...")
  1081. elif mes2[0] == "--MATCHED":
  1082. print("Opponent:")
  1083. print(" Name: "+mes2[1])
  1084. if mes2[2] != "-": print(" Crew: "+mes2[2])
  1085. else: print(" Not of Crew")
  1086. print(" Rep: "+mes2[3])
  1087. Player = PR(mes2[1],16)+"|"+PR(mes2[2],16)+"| "+PR(mes2[3],5)
  1088. for i in range(4):
  1089. print("Sleep last: "+str(4-i))
  1090. time.sleep(1)
  1091. elif mes2[0] == "--UPDATE":
  1092. if Str[0] == -1: Str[0] = int(HO[0].split("/")[0]) - int(mes2[4].split("/")[0])
  1093. if Str[1] == -1: Str[1] = int(HO[1].split("/")[0]) - int(mes2[3].split("/")[0])
  1094. if Str[2] == -1: Str[2] = int(HO[2].split("/")[0]) - int(mes2[2].split("/")[0])
  1095. HO = [mes2[4],mes2[3],mes2[2]]
  1096. HO2 = [mes2[7],mes2[6],mes2[5]]
  1097. print("Time left: "+str(int(mes2[1])//60)+":"+str(int(mes2[1])%60))
  1098. print("Oppenent:")
  1099. print(" Core: "+mes2[2]+" AV: "+mes2[3]+" FW: "+mes2[4])
  1100. print("I:")
  1101. print(" Core: "+mes2[5]+" AV: "+mes2[6]+" FW: "+mes2[7])
  1102. if mes2[3].split("/")[0] == "0" and mes2[4].split("/")[0] == "0":
  1103. RazB1 = True
  1104. UseBoosters()
  1105. for i in [5,6,7]:
  1106. Zn = [int(mes2[i].split("/")[0]),int(mes2[i].split("/")[1])]
  1107. if Zn[0] > 0 and Zn[0] <= Zn[1]//10:
  1108. RazB2 = True
  1109. UseBoosters()
  1110. break
  1111. elif mes2[0] == "--BUPD":
  1112. RazB = [mes2[1],mes2[2],mes2[3],mes2[4],mes2[5]]
  1113. print("Boosters: "+",".join(RazB))
  1114. UseBoosters()
  1115. elif mes2[0] == "--BW":
  1116. print("BandWidth: "+mes2[1]+"%")
  1117. print("Time left: "+str(int(mes2[2])//60)+":"+str(int(mes2[2])%60))
  1118. if int(mes2[1]) >= 30:
  1119. if HO[1].split("/")[0] != "0": IDN = "2"
  1120. elif HO[0].split("/")[0] != "0": IDN = "1"
  1121. elif HO[2].split("/")[0] != "0": IDN = "3"
  1122. else:
  1123. print("Error")
  1124. return
  1125. conn.send(b64encoder(":HIT "+IDN).encode("utf-8"))
  1126. print("I hit "+arr[IDN]+"...")
  1127. elif mes2[0] == "--BOOSTED":
  1128. if mes2[1] == "0": Zn = "Opponen"
  1129. else: Zn = "I"
  1130. print(" "+Zn+" use boost "+arr2[mes2[2]]+" (this -"+mes2[3]+" ex")
  1131. elif mes2[0] == "--HOT":
  1132. if mes2[1] == "0": Zn = "I"
  1133. else:
  1134. Zn = "Opponent"
  1135. Zn2 = int(mes2[2])-1
  1136. if Str[Zn2] == 0: Str[Zn2] = -1
  1137. print(" "+Zn+" hit "+arr[mes2[2]])
  1138. elif mes2[0] == "--DNODE":
  1139. if mes2[1] == "0": print("My node "+arr[mes2[2]]+" dead :/")
  1140. else: print("Opponent node "+arr[mes2[2]]+" dead ;]")
  1141. elif mes2[0] == "--GAMEOVER":
  1142. if mes2[1] == "1": print("I won: "+mes2[2]+"rep ;'-}")
  1143. else: print("I lose: "+mes2[2]+"rep ;'-{")
  1144. conn.send(b64encoder(":QUIT").encode("utf-8"))
  1145. conn.close()
  1146. Ex = False
  1147. Str = list(map(str,Str))
  1148. Data = PR(mes2[2],6)+"|"+Player+"|"+PR(HO[0],11)+"|"+PR(HO[1],11)+"|"+PR(HO[2],11)+"|"+PR(HO2[0],11)+"|"+PR(HO2[1],11)+"|"+PR(HO2[2],11)+"|"+PR(Str[0],12)+"|"+PR(Str[1],11)+"|"+PR(Str[2],14)+"\n"
  1149. V = "2"
  1150. try:
  1151. with open("/sdcard/qpython/ServerWars.txt","r") as file:
  1152. FD = file.read()
  1153. if FD[1:FD.index(")")] != V: Er = 1/0
  1154. with open("/sdcard/qpython/ServerWars.txt","a") as file: file.write(Data)
  1155. except:
  1156. print("New file ServerWars")
  1157. Data = "("+V+")Rep| OppName | OppCrew |OppRep| OppFW | OppAV | OppCore | MyFW | MyAV | MyCore |OppPypassStr|OppSmashStr|OppShutdownStr\n"+Data
  1158. with open("/sdcard/qpython/ServerWars.txt","w") as file: file.write(Data)
  1159. elif mes2[0] == "--BYE":
  1160. print("EXIT...")
  1161. Ex = False
  1162. break
  1163. else:
  1164. print("*Error: "+mes)
  1165. res = request(Paths[3],user2)
  1166. print("•Rep: "+res["myrep"])
  1167. print("•Winrate: "+res["winrate"])
  1168. print("SERVERWARS ENDED!")
  1169. Update()
  1170.  
  1171. def Ranking():
  1172. res = request(Paths[16],user2)
  1173. print("Ranking 1on1:")
  1174. print(" Rank: "+res["my1on1Rank"])
  1175. print(" Rep: "+res["my1on1Rep"])
  1176. print("Ranking daily:")
  1177. print(" Rank: "+res["tournamentrank"])
  1178. print(" Exp: "+res["expgain"])
  1179. print("*"*24)
  1180. Update()
  1181.  
  1182. Loop = 1
  1183. colExp = 0
  1184. colBoosters = 0
  1185. colNetCoins = 0
  1186. colServer = 0
  1187. colAV = 0
  1188. colFW = 0
  1189. colFrags = 0
  1190. colMWK = 0
  1191. colMoney = 0
  1192.  
  1193. print("Bot "+Name+" Started!")
  1194. Auth()
  1195. SocketCreator()
  1196. threading.Thread(target=PingPong, args=()).start()
  1197.  
  1198. RazN = True
  1199. while True:
  1200. OpenValues()
  1201. if Wall:
  1202. try:
  1203. print(Update())
  1204. Ranking()
  1205. BuyInet()
  1206. if RazN:
  1207. RazN = False
  1208. Chat("Bot started!")
  1209. if Loop % 10 == 0 or Loop == 1 or SDK < 100: Store()
  1210. FriendsAccept()
  1211. except:
  1212. print("Error module 1")
  1213. SocketCreator()
  1214. continue
  1215. else:
  1216. print(Update())
  1217. Ranking()
  1218. BuyInet()
  1219. if RazN:
  1220. AutoBan(time.gmtime(time.time()),True) #test
  1221. RazN = False
  1222. Chat("Bot started!")
  1223. if Loop % 25 == 0 or Loop == 1 or SDK < 100: Store()
  1224. FriendsAccept()
  1225. timers = [["NetWorkHacker","NetWork()"],["DailyRewards","Missions()"]]
  1226. if Upd[0]: timers += [["MalwerKit","MWK()"]]
  1227. if Upd[1]: timers += [["Server","Server()"]]
  1228. if Upd[2]: timers += [["Miner","Mining()"]]
  1229. if Wall:
  1230. try:
  1231. for i in timers: i[1] = eval(i[1])
  1232. except:
  1233. print("Error module 2")
  1234. SocketCreator()
  1235. continue
  1236. else:
  1237. for i in timers: i[1] = eval(i[1])
  1238. SaveValues()
  1239. Min = 3600
  1240. if Loop % 25 == 0: Chat("Loop: "+str(Loop)+"\\nCollected:\\nExp: "+str(colExp)+"\\nBoosters: "+str(colBoosters)+"\\nNetCoins: "+str(colNetCoins)+"\\nServer: "+str(colServer)+"\\nAV: "+str(colAV)+"\\nFW: "+str(colFW)+"\\nFrags: "+str(colFrags)+"\\nMWK: "+str(colMWK)+"\\nMoney: "+str(colMoney))
  1241. Strr = "Loop: "+str(Loop)
  1242. for i in timers:
  1243. i[1] = int(i[1])
  1244. Strr += "/" + str(i[0])
  1245. Min = min(Min,i[1])
  1246. Dl = Min
  1247. if Dl >= 60:
  1248. T = time.time()
  1249. if Values[5] != "0" and Upd[1]: ServerWars()
  1250. T = int(time.time() - T)
  1251. Dl -= T
  1252. for i in timers: i[1] -= T
  1253. print(Strr)
  1254. while Dl > 0:
  1255. Strr = ""
  1256. for i in timers: Strr += " " + str(i[1])
  1257. print(Strr)
  1258. if Dl>=15: Sl = 15
  1259. else: Sl = Dl
  1260. time.sleep(Sl)
  1261. Dl -= Sl
  1262. for i in timers: i[1] -= Sl
  1263. if Pong: Error = 1 / 0
  1264. if Pong: Error = 1 / 0
  1265. Strr = ""
  1266. for i in timers: Strr += " " + str(i[1])
  1267. print(Strr)
  1268. if TimePong + 300 <= time.time():
  1269. print("Crash PingPong detected!")
  1270. Auth()
  1271. SocketCreator()
  1272. threading.Thread(target=PingPong, args=()).start()
  1273. Loop += 1
Add Comment
Please, Sign In to add comment