We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impacket version: v0.12.0.dev1 Python version: 3.11.9 Target OS: Linux
impacket-smbserver -debug -ip :: tmp /tmp
# impacket-smbserver -debug -ip :: tmp /tmp Impacket v0.12.0.dev1 - Copyright 2023 Fortra [+] Impacket Library Installation Path: /usr/lib/python3/dist-packages/impacket Traceback (most recent call last): File "/usr/share/doc/python3-impacket/examples/smbserver.py", line 71, in <module> server = smbserver.SimpleSMBServer(listenAddress=options.interface_address, listenPort=int(options.port)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/impacket/smbserver.py", line 4891, in __init__ self.__server = SMBSERVER((listenAddress, listenPort), config_parser=self.__smbConfig) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/impacket/smbserver.py", line 3986, in __init__ socketserver.TCPServer.__init__(self, server_address, handler_class) File "/usr/lib/python3.11/socketserver.py", line 456, in __init__ self.server_bind() File "/usr/lib/python3.11/socketserver.py", line 472, in server_bind self.socket.bind(self.server_address) socket.gaierror: [Errno -9] Address family for hostname not supported
In socketserver.py line 439 we have an explicit bind to a legacy socket:
address_family = socket.AF_INET
changing this to AF_INET6 is enough to make it support explicit bindings to ipv6 addresses.
It also by default only tries to bind to the legacy any address in examples/smbserver.py line 43:
parser.add_argument('-ip', '--interface-address', action='store', default='0.0.0.0', help='ip address of listening interface')
Changing the default to :: fixes it.
The text was updated successfully, but these errors were encountered:
linked with #1811
Sorry, something went wrong.
No branches or pull requests
Configuration
impacket version: v0.12.0.dev1
Python version: 3.11.9
Target OS: Linux
Debug Output With Command String
impacket-smbserver -debug -ip :: tmp /tmp
Additional context
In socketserver.py line 439 we have an explicit bind to a legacy socket:
address_family = socket.AF_INET
changing this to AF_INET6 is enough to make it support explicit bindings to ipv6 addresses.
It also by default only tries to bind to the legacy any address in examples/smbserver.py line 43:
parser.add_argument('-ip', '--interface-address', action='store', default='0.0.0.0', help='ip address of listening interface')
Changing the default to :: fixes it.
The text was updated successfully, but these errors were encountered: