CLASSIFICATION = "proxy"
LABEL = "Proxy / VPN"
MAX_PAGES = 50 # cap (2000 records/page); small categories are pulled in full
records, total, complete = pull_target_intel(classifications=CLASSIFICATION, max_pages=MAX_PAGES)
# Sub-type counts tallied from the records (the classifications filter only matches
# the top-level category, so sub-types are counted directly). Exact when fully
# pulled, sample-based otherwise.
prefix = CLASSIFICATION + ":"
counter = Counter()
for r in records:
for tag in (r.get("classifications") or []):
if tag.startswith(prefix):
counter[tag.split(":", 1)[1]] += 1
subtypes = pd.DataFrame(counter.most_common(), columns=["Sub-type", "Host Records"])
scope = "all" if complete else f"sampled {len(records):,} of"
print(f"{LABEL}: {total:,} host records ({scope} pulled) | {len(subtypes)} entries")