Enter Username and Select Project Programmatically in Archive Team Warrior

Enter Username and Select Project Programmatically in Archive Team Warrior

I wanted to be able to run:

sudo apt-get update; sudo apt-get -y upgrade; sudo apt-get -y install docker.io; sudo usermod -aG docker steven; sudo reboot
docker run -d -p 8001:8001 archiveteam/warrior-dockerfile

And have the warrior up, however the problem is then I need to use my browser to enter a username and select a project.

We can leverage curl to make the necessary requests for us using only the command line.

curl 'http://localhost:8001/api/settings' -H 'Origin: http://localhost:8001' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Referer: http://localhost:8001/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data 'downloader=USERNAME&concurrent_items=2&http_username=&http_password=' --compressed

curl 'http://localhost:8001/api/select-project' -H 'Origin: http://localhost:8001' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Referer: http://localhost:8001/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data 'project_name=auto' --compressed

You can test if it worked with curl 'http://localhost:8001/info' -H 'Referer: http://localhost:8001/' --compressed

Tip: Use parallel-scp and parallel-ssh to quickly spin up multiple warriors.

Leave a Reply

Your email address will not be published. Required fields are marked *