您或许可以只使用 IP 地址而不是名称。 Windows 中需要机器名的系统调用通常也同样接受数字地址。
例如,这两者都有效:
>>> import _winreg
>>> c = _winreg.ConnectRegistry("SOMEMACHINE", _winreg.HKEY_CLASSES_ROOT)
>>> c = _winreg.ConnectRegistry("10.10.40.9", _winreg.HKEY_CLASSES_ROOT)
You can probably just use an IP address rather than a name. System calls in Windows that requires a machine name will generally also accept a numeric address just the same.
e.g. these both work:
>>> import _winreg
>>> c = _winreg.ConnectRegistry("SOMEMACHINE", _winreg.HKEY_CLASSES_ROOT)
>>> c = _winreg.ConnectRegistry("10.10.40.9", _winreg.HKEY_CLASSES_ROOT)
发布评论
评论(2)
您或许可以只使用 IP 地址而不是名称。 Windows 中需要机器名的系统调用通常也同样接受数字地址。
例如,这两者都有效:
You can probably just use an IP address rather than a name. System calls in Windows that requires a machine name will generally also accept a numeric address just the same.
e.g. these both work:
非常适合 Windows 的 hack,效果很好。
Very windows specific hack that works okay.