metasploitable3/chef/cookbooks/metasploitable/files/flags/five_of_diamonds_srv
James Barnett 5bbed5387e Add five_of_diamonds flag
This flag is hidden within a binary that runs a webservice on a given port.
The port is blocked until the correct port knocking sequence is initiated.
The default port sequence is all of the user's salary numbers.

The commit also moves a lot of values that were previously in recipes into
attributes files for easier maintaining going forward.
2017-06-30 14:47:30 -05:00

39 lines
660 B
Bash

#!/bin/sh
### BEGIN INIT INFO
# Provides: five_of_diamonds
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Init script for five_of_diamonds
# Description: Start/stop five_of_diamonds
### END INIT INFO
DESC="five_of_diamonds"
NAME=five_of_diamonds
#DAEMON=
do_start()
{
echo "Starting five_of_diamonds.";
/opt/knock_knock/five_of_diamonds -p 8989 &
}
do_stop()
{
echo "Stopping five_of_diamonds."
killall five_of_diamonds
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
esac
exit 0