How to use Python SMB connection when you don't know the server's IP?
smb = SMBConnection (user_id, password, client, server_name, domain = domain, use_ntlm_v2=True, is_direct_tcp=True) ip = socket.gethostbyname (server_name) print (ip) smb.connect (server_name, 445) Share Improve this answer Follow answered Apr 14, 2020 at 8:00 Vino Nivi 3 4 Add a comment Your Answer