Skip to content

Instantly share code, notes, and snippets.

@marcel-drost
marcel-drost / create_whitelist.py
Created March 12, 2025 15:38 — forked from b0tting/create_whitelist.py
Python script that extracts a list of all mirror sites from a mirrormanager URL. This should fulfill all required sitenames in a situation where you need to whitelist everything that can be touched from a yum.repos.d directory. In case of Rockylinux, note you'll need both Rocky Linux and Fedora site mirrors.
# This will use beuaitful soup to get thet list of linux mirror sites from a linux mirror site. Usecase
# for me was to generate a whitelist for a proxy server.
import re
import sys
try:
import argparse
import requests
from bs4 import BeautifulSoup
except ImportError as e: