mirror of
https://github.com/Laborratte5/linux-iso-seeder.git
synced 2025-12-30 17:08:17 +01:00
Fetching more kali images
This commit is contained in:
parent
498b0a7039
commit
0cfeb056a6
1 changed files with 14 additions and 8 deletions
|
|
@ -100,20 +100,26 @@ def fetch_arch_latest():
|
|||
return download_torrent("archlinux-latest", torrent_url)
|
||||
|
||||
def fetch_kali_latest():
|
||||
T_PATTERN = re.compile(r"kali-linux-(\d+\.\d+)-installer(?:-(netinst|everything))?-amd64\.iso\.torrent$")
|
||||
url = "https://www.kali.org/get-kali/#kali-installer-images"
|
||||
try:
|
||||
try:
|
||||
r = requests.get(url, timeout=30)
|
||||
r.raise_for_status()
|
||||
soup = BeautifulSoup(r.text, "html.parser")
|
||||
|
||||
for link in soup.find_all('a', href=True):
|
||||
href = link['href']
|
||||
if href.endswith(".torrent"):
|
||||
torrent_url = href
|
||||
results = {}
|
||||
|
||||
for a in soup.find_all("a", href=True):
|
||||
href = a["href"]
|
||||
if T_PATTERN.search(href):
|
||||
name = os.path.basename(href).replace(".torrent", "")
|
||||
return download_torrent(name, torrent_url)
|
||||
logging.warning("No Kali torrent found.")
|
||||
return False
|
||||
results[name] = download_torrent(name, href)
|
||||
|
||||
if not results:
|
||||
logging.warning("No Kali installer torrents found.")
|
||||
return False # or return {} if you prefer
|
||||
|
||||
return results
|
||||
except Exception as e:
|
||||
logging.error(f"Kali fetch error: {e}")
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue