0

i tried building a simple port scanner in linux and this is the code

 #!/bin/python3

    #sockets
    import socket 
    HOST= "127.0.0.1"
    PORT = 7777

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((HOST,PORT))

AND THIS IS THE ERROR IT THREW BACK AT ME

 Traceback (most recent call last):
      File "/home/kali/python/s.py", line 9, in <module>
        s.connect((HOST,PORT))
    ConnectionRefusedError: [Errno 111] Connection refused

I was expecting the code make a connection on the 7777 port

0 Answers0