From 350b9f4447d743117b1af855c000a03db83ceda6 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 30 Jun 2026 20:08:54 +0000 Subject: [PATCH] arch: import read_nameservers on illumos-based systems too to prevent it from failing there with: ``` ... from scapy.all import * File "/root/scapy/scapy/all.py", line 16, in from scapy.arch import * AttributeError: module 'scapy.arch' has no attribute 'read_nameservers' ``` With this patch applied run_scapy no longer fails and dns_resolve works as expected: ``` >>> sys.platform 'sunos5' >>> dns_resolve('example.com') [, ] ``` F403 isn't needed there (it was probably copied from the next line) so it was removed to avoid hitting E501 line too long (89 > 88 characters). It's a follow-up to 528626a02c7bfa404a85857375da5f9b3203ebaa AI-Assisted: no --- scapy/arch/solaris.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scapy/arch/solaris.py b/scapy/arch/solaris.py index cb30bf04e89..4ec420ab26b 100644 --- a/scapy/arch/solaris.py +++ b/scapy/arch/solaris.py @@ -18,7 +18,7 @@ # From sys/sockio.h and net/if.h SIOCGIFHWADDR = 0xc02069b9 # Get hardware address -from scapy.arch.common import get_if_raw_addr # noqa: F401, F403, E402 +from scapy.arch.common import get_if_raw_addr, read_nameservers # noqa: F401, E402 from scapy.arch.libpcap import * # noqa: F401, F403, E402 from scapy.arch.unix import * # noqa: F401, F403, E402