c0d3dsk1lls

create_connection.py

Jun 27th, 2022 (edited)
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. #IF CONNECTION = SUCCESS THEN PRINT = IT WORKS IT WILL.
  2. import socket
  3. def main():
  4.     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  5.     host = '192.168.0.28'
  6.     port = 80
  7.     s.connect((host, port))
  8.     print('it works')
  9.     s.close()
  10.    
  11.    
  12.    
  13. if __name__ == '__main__':
  14.     main()
  15.  
  16.  
Add Comment
Please, Sign In to add comment