write-ups-challenges-2020-2021/lost-keys/test_script/test_script.sh

14 lines
161 B
Bash
Raw Permalink Normal View History

2022-11-24 17:03:20 +00:00
#!/bin/bash
# $1: IP, $2: Port
RES=$(ssh -p $2 -i id_rsa joske@$1 "cat flag.txt")
echo $RES
if [[ "$RES" == *"IGCTF"* ]]; then
exit 0
else
exit 1
fi