I had a hard time managing password for different level's of WarGames. So, being the lazy sysadmin I am, I decided to write a small shell script that saves the password and helps me login.
You know the drill, save login.sh
where ever you want.
It's best to have individual folder for each game. Inside the folder create GAME
file which contains wargaame title and the ssh port separated by a colon (:
). Ex. for bandit wargame bandit:2220
.
The script has two options, one for saving password another for ssh-ing into the game.
$ ./login -s 0 bandit0
LEVEL 0: Trying to login
$ ./login -l 0
LEVEL 0: Saving password
$ ./login --save-and-login 0 bandit0
July 2021, Muse Sisay