bandit level8

반응형


OverTheWire 문제풀이 - Bandit

* Bandit 는 리눅스 관련 문제입니다.

* 리눅스 명령어를 연습하기에 아주 좋습니다.

* 개인적인 문제풀이로 해답을 보시기 전에 직접 풀어보시기를 권해드립니다.


Bandit level8


The password for the next level is stored in the file data.txt and is the only line of text that occurs only once


Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd


Helpful Reading Material

The unix commandline: pipes and redirects


다음 레벨의 암호는 data.txt 파일에 저장되며 한 번만 발생하는 텍스트 행입니다


이 레벨을 해결하는 데 필요할 수있는 명령

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd


유용한 읽기 자료

유닉스 커맨드 라인 : 파이프와 리다이렉트



ls 명령어로 현재 디렉토리를 살펴보니 data.txt 파일이 있습니다.



cat 명령어로 확인해보니 아주 길고 복잡한 문자열들이 뒤섞여있는데 다음 레벨의 패스워드는 오직 한줄이 있다고 합니다.

처음에 딱 봤을때는 감이 잡히지 않습니다.



힌트를 살펴보면 필요할 수 있는 명령중에 sort 와 uniq 명령어가 눈에 띕니다.

sort 명령어는 리눅스 파일 내용을 정렬시켜주는 명령어이고 uniq 명령어는 파일 내용중 중복되는 내용을 없애주는 명령어입니다.

sort로 먼저 정렬해보면 중복되는 문자들이 많이 보입니다.



파이프(|)를 사용하여 data.txt에 대한 내용을 정렬 후 중복 내용을 제거해주면 하나의 문장이 뜹니다.

이 문자열들이 다음 레벨의 패스워드가 되겠네요.

sort/uniq 명령어 사용법 보러가기

next level password : UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR


반응형

'War Game > bandit' 카테고리의 다른 글

Bandit level10  (0) 2017.02.23
Bandit level9  (0) 2017.02.23
bandit level7  (0) 2017.02.21
bandit level6  (0) 2017.02.16
bandit level5  (0) 2017.02.16
TAGS.

Comments