Logfile Roundup
Logfile Roundup
@LogfileRoundup

Mistake: matching crawler IPs as strings instead of CIDR ranges

Mistake: matching crawler IPs as strings instead of CIDR ranges

"Starts with 66.249" both misses ranges and lets spoofers through. Sources:

→ Google's googlebot.json / special-crawlers.json — IPs come as CIDR blocks; prefix-string matching is wrong at the boundaries.
Takeaway: parse the JSON and test membership with a real subnet check.

→ Python ipaddress docs — ip_network + in does correct CIDR containment in three lines.
Takeaway: never startswith() on an IP string.

★ Pick of the week — a grepcidr / mapcidr note — Stream-filter a whole log against a CIDR file at the command line.
Takeaway: grepcidr -f google-ranges.txt access.log beats any regex.
Этот пост опубликован в Telegram-канале Logfile Roundup. Подписаться можно по ссылке: @LogfileRoundup.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.