Skip to content

mt2h/sadservers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Troubleshooting Scenarios

Easy

Easy

lsof -f | grep bad.log
kill <process_id>

Easy

more_repeat_ip=$(cut -f 1 -d " " /home/admin/access.log | sort | uniq -c | sort | tail -n 1)
echo $more_repeat_ip | cut -f 2 -d " " > /home/admin/highestip.txt

Easy

cd /home/admin
grep Alice *.txt | wc -l #find all lines with Alice text in all of files with extension txt, return 411
grep Alice *.txt | cut -f 1 -d "." | sort | uniq -c | sort #show repeat in each all files, file is 1342-0
grep -A 1 Alice 1342-0.txt #return 156 (-A 1 is next line from grep)
echo -n 411 > /home/admin/solution; echo 156 >> /home/admin/solution

Easy

cd clmystery
cat instructions
cd mystery
grep -n "CLUE" crimescene # grep -n show line find CLUE
grep Annabel people #2 womands in lines 40 and 179
sed -n "40p" streets/Hart_Place #show only line 40, SEE INTERVIEW #47246024
sed -n "179p" streets/Buckingham_Place #return SEE INTERVIEW #699607

cat interviews/interview-47246024 #no
cat interviews/interview-699607 #get data matricula car

cat vehicles | tr '\n' ' ' | sed 's/License/\n&/g' | grep L337..9 | grep Honda | grep -n -e Blue
#tr "\n" " ": reemplaza saltos de líneas por espacios

#sed 's/License/\n&/g': Inserta saltos de línea antes de cada aparición de la palabra "License" y el "&" sirve para que la palabra reemplaza se mantenga, es decir deja "License" por "\nLicense"
#grep -n -e, n muestra la línea y e permite buscar patrones

grep "Joe Germuska" memberships/* #el tiene las membresias

echo "Joe Germuska" > ~/mysolution

Easy

nmap -p- localhost #show port open and close, not considered 22 for is use for SSH, 6767 and 8080
knock localhost 6767 #fist sequence knock
knock localhost 8080 #seconds sequence knock
curl localhost
echo $(curl localhost)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published