First we connect to the server using ssh
Then we use sort
and uniq
commands to get the changed lines in both the files
ssh [email protected] -p 2220
cat passwords.old passwords.new | sort | uniq -u
cat passwords.old passwords.new
prints the data of both the files in the given order
sort
sorts it
uniq -u
displays only the unique lines. Since one line is changed there are two output lines.
One from passwords.old
, other from passwords.new
.
Since we require the one from passwords.new
, the second line is our flag
Flag - hga5tuuCLF6fFzUpnagiMN8ssu9LFrdg