Guest User

Untitled

a guest
Jan 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. import socket
  2.  
  3. print 'Socket Test:'
  4.  
  5. host = "localhost"
  6. port = 63333
  7. buffer = 1024
  8. addr = (host,port)
  9.  
  10. sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  11. sock.connect((host,port))
  12.  
  13. sock.send('{"method" : "authentication", "server_password" : "admin", "client_id" : "idpy1"}\r\n')
  14. print sock.recv(100)
  15. sock.send('{"method" : "get_sim_config"}\r\n')
  16. print sock.recv(100)
  17.  
  18. sock.close()
Add Comment
Please, Sign In to add comment