Level 17 → Level 18

옥영진·2020년 5월 18일
0

Bandit - OverTheWire

목록 보기
18/33

Level 17 → Level 18

목표

Level Goal
There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new

NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19

Commands you may need to solve this level
cat, grep, ls, diff

다음 레벨로 가는 패스워드는 홈 디렉토리 내에 passwords.new 파일에 존재하는데, 같은 디렉토리에 있는 passwords.old 파일과 겹치지 않는 부분이다.

해결

diff ./passwords.new ./passwords.old

diff 명령어를 사용하여 두 파일을 비교하여 다른 부분을 출력한다. 두 개의 문자열이 출력되는데, passwords.new에 패스워드가 존재하므로 첫 번째 문자열이 다음 레벨로 가는 패스워드가 된다.

  • diff
    두 파일 사이의 내용을 비교하는 명령어다.
profile
안녕하세요 함께 공부합시다

0개의 댓글