fix: ASN dictionary pipeline + verbose bot-detector logging
- Fix dict_iplocate_asn: remove non-existent org/domain columns (4→4 cols) - Add CSV header to iplocate-ip-to-asn.csv (CSVWithNames format) - Replace org/domain dictGet calls with empty string literals in MV - Full 714K CIDR stub for complete ASN resolution in tests - Add header generation to generate_asn_data.py - Verbose bot-detector stdout: data summary, triage breakdown, model training details, scoring stats, browser classification, boxed results - Fix IPv6 filter in traffic seeder (_ips_from_cidrs) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -517,12 +517,14 @@ def _gen_ips_from_prefixes(prefixes, n, rng):
|
||||
|
||||
|
||||
def _ips_from_cidrs(cidrs, n, rng):
|
||||
"""Generate *n* unique IPs from a list of CIDR strings."""
|
||||
"""Generate *n* unique IPv4 IPs from a list of CIDR strings."""
|
||||
networks = []
|
||||
single_ips = []
|
||||
for c in cidrs:
|
||||
try:
|
||||
net = ipaddress.ip_network(c, strict=False)
|
||||
if net.version != 4:
|
||||
continue
|
||||
if net.prefixlen == 32:
|
||||
single_ips.append(str(net.network_address))
|
||||
elif net.num_addresses > 2:
|
||||
|
||||
Reference in New Issue
Block a user