parent
ee4bb1a184
commit
a53f2205bf
|
@ -3,12 +3,13 @@ import argparse
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
LOGGER = logging.Logger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("host", help="The IPv6 address of the host to connect to.")
|
parser.add_argument("host", help="The IPv6 address of the host to connect to.")
|
||||||
parser.add_argument("--port", "-p", default=50007, help="The port to connect to.")
|
parser.add_argument("--port", "-p", default=50007, help="The port to connect to.")
|
||||||
|
parser.add_argument("--verbose", action="store_true", help="Verbose logging")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
addresses = [addr for addr in socket.getaddrinfo(host=args.host, port=args.port, family=socket.AF_INET6, type=socket.SOCK_STREAM, proto=0, flags=0)]
|
addresses = [addr for addr in socket.getaddrinfo(host=args.host, port=args.port, family=socket.AF_INET6, type=socket.SOCK_STREAM, proto=0, flags=0)]
|
||||||
|
|
Loading…
Reference in New Issue