Skip to content

as_resolvers: read complete whois banner and guard against None ASN - #5230

Open
BenGardiner wants to merge 1 commit into
secdev:masterfrom
BenGardiner:fix-as-resolvers
Open

BenGardiner wants to merge 1 commit into
secdev:masterfrom
BenGardiner:fix-as-resolvers

Conversation

@BenGardiner

Copy link
Copy Markdown
Contributor

When reading the WHOIS server banner in AS_resolver._start(), read until stream completion or error response rather than assuming a single 8192-byte read. In AS_resolver6._resolve(), check that asn is not None before calling startswith(). Allow rate-limiting error responses in whois regression tests.

AI-Assisted: yes (Gemini)

Description

fixes a failure I saw in CI runs recently

When reading the WHOIS server banner in AS_resolver._start(), read until
stream completion or error response rather than assuming a single 8192-byte
read. In AS_resolver6._resolve(), check that asn is not None before calling
startswith(). Allow rate-limiting error responses in whois regression tests.

AI-Assisted: yes (Gemini)
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.20%. Comparing base (5376fcc) to head (322d5ac).

Files with missing lines Patch % Lines
scapy/as_resolvers.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5230      +/-   ##
==========================================
+ Coverage   80.89%   81.20%   +0.30%     
==========================================
  Files         394      394              
  Lines       98710    98715       +5     
==========================================
+ Hits        79853    80158     +305     
+ Misses      18857    18557     -300     
Files with missing lines Coverage Δ
scapy/layers/inet6.py 88.79% <100.00%> (ø)
scapy/as_resolvers.py 84.54% <83.33%> (-0.22%) ⬇️

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant