Browsed by
Category: CLI

Command Line or Terminal

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;…

Read More Read More

Search History in Bash

Search History in Bash

I keep using history | grep but is there a better way of searching history? Digital Ocean has a nice blog post on history in bash CTRL-R quickly search the history. eg CTRL-R ssh !-2 will run the 2nd last command entered into history. !! runs the previous command which can be combined with sudo sudo !! !1 will get the 1st (or nth if you change 1) argument of the previous command.

History in Bash

History in Bash

Useful tips: Put this into ~/.bashrc: HISTSIZE=5000 #controls how much history is loaded into memory HISTFILESIZE=10000 #controls how much history is saved on disk #By default bash overwrites the history file at the end of each session #which is a pain if you open multiple shells (not all history is saved) #use this to append to the history file shopt -s histappend However if you want each history item to be available in every shell as soon as you press…

Read More Read More

Run ArchiveTeam Warrior on Google Cloud Compute

Run ArchiveTeam Warrior on Google Cloud Compute

Create an instance and then ssh into it. Install docker using sudo apt-get install docker.io Add yourself to the docker user group sudo usermod -aG docker steven Restart the docker service using sudo service docker restart or reboot using sudo reboot, if you restarted the service you’ll need to logout and back in due to the change in group. Run the warrior docker run -d -p 8001:8001 archiveteam/warrior-dockerfile Congradulations you can now exit and use ssh -L 8001:localhost:8001 google-server to…

Read More Read More