sajjadium / ctf-archives

CTF Archives: Collection of CTF Challenges.
https://twitter.com/sajjadium
MIT License
853 stars 133 forks source link

fix some urls #5

Closed mheidari98 closed 6 months ago

sajjadium commented 6 months ago

Applied your changes manually. Thank you.

mheidari98 commented 6 months ago

Thanks for your attention. I've noticed that there are still some inaccessible URLs that need fixing. Could you please take another look? Also, to help identify the inaccessible URLs more easily, you can use this Python script:

from github import Auth, Github
from bs4 import BeautifulSoup

token = "access_token"
auth = Auth.Token(token)
g = Github(auth=auth)

repo = g.get_repo("sajjadium/ctf-archives")
README = repo.get_contents("README.md")
soup = BeautifulSoup(README.decoded_content, 'lxml')

for td in soup.find_all('td'):
    href = td.a.attrs['href']
    if href.startswith('https'):
        continue
    try:
        repo.get_contents(href)
    except:
        print(td)