Created
June 2, 2024 10:45
-
-
Save Waester/f85cf258b317211c298b236454291240 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from urllib.parse import unquote | |
import requests | |
url = 'http://dev.packages.vyos.net/' | |
path = '?dir=repositories/equuleus/pool/main' | |
def scan(_path): | |
page = requests.get(url + _path).text | |
soup = BeautifulSoup(page, 'html.parser') | |
for a in soup.find_all('a'): | |
path = None | |
if a['href'].endswith('.deb'): | |
print(unquote(a['href'])) | |
elif _path in a['href'] and a['href'] != _path: | |
path = a['href'] | |
if path: | |
scan(path) | |
scan(path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment