Anon-Exploiter / infosecinstitute-dl

A small and dirty python3 based script to download courses from Infosec Institute.
MIT License
12 stars 12 forks source link
aria2c infosec-institute infosecinstitute-dl python3

infosecinstitute-dl

made-with-python GitHub Contributors GitHub closed issues Twitter

A small and dirty python based script to download courses from InfosecInstitute.

asciicast

Description

InfosecInstitute courses downloader. Requires Python3 and aria2 (for downloading).

Infosec.py automates everything, it'll return the list of all paths, user will enter the path ID, it'll create a new folder and will start downloading all the path files in there.

Alternatively, you can now use all to download all the learning paths available to you.

Requirements

Tested On

Execution

If you want, you can edit the file infosec.py and hard-code the credentials in the variables or you use can environmental variables in two ways, directly through exporting in CLI or by adding credentials in creds.sh and source it.

Hardcoding credentials in the file infosec.py

def main():
    ddlURLs   = []
    host      = "..."
    loginURL  = "..."

    username  = ""
    password  = ""

On linux (with env variables):

export IUSERNAME=test@gmail.com
export IPASSWORD=password

python3 infosec.py

On linux (with creds.sh):

source creds.sh
python3 infosec.py

The script doesn't work well on Mac OS and on Windows. Mac has some weird issues in execution while Windows doesn't have aria2 (it now does have it, but ah well) - So the solution to all this is to use a Docker container built from a Dockerfile.

docker build -t infosec-institute .
docker run -it --rm -v `pwd`:/root/ -e 'IUSERNAME=test@test.com' -e 'IPASSWORD=pswd' infosec-institute

Features

Features (not-supported)

PDF files aren't being downloaded now since they're using a external host for rendering the PDFs and that's llviewersg3a.com. Can't find a workaround for this, make sure to submit an issue or PR if you find one.

Filing Bugs/Contribution

Feel free to file a issue or create a PR if you come across any. Also, before creating a issue, make sure to execute the updated script with -d argument and share the whole output for better understanding of the issue.

python3 infosec.py -d