etc (12) 썸네일형 리스트형 4. Over the Wire / Bandit Level 8 → 9 (uniq, pipe) > Bandit 8 → Bandit 9 The password for the next level is stored in the file data.txt and is the only line of text that occurs only once. 다음 레밸의 비밀번호는 data.txt 파일에 숨겨져 있고, 한 번만 출력되는 문자열이다. bandit8의 password를 입력한다. ls -a 숨겨진 파일, 디렉토리를 함께 보여줌 cat data.txt data.txt 파일 내용 출력 cat data.txt 명령어를 입력하니 수많은 문자열들이 출력된다. 중복 되지 않은 문자열을 찾기 위해 중복 되는 문자열을 삭제하는 uniq -u 명령어를 사용해야 한다. 하지만, uniq -u 명령어는 "중복된 내용의 행이 .. 3. Over the Wire / Bandit Level 7 → 8 (grep, 정규 표현식) > Bandit Level 6 → Bandit Level 7 The password for the next level is stored in the file data.txt next to the word millionth 다음 레벨의 비밀번호는 data.txt 파일 안 millionth이라는 단어 옆에 있다 bandit7의 password를 입력한다. ls -a 숨겨진 파일, 디렉토리를 함께 보여줌 cat data.txt 해당 파일 내용 출력 data.txt 파일 내용을 출력 해보니 위 처럼 수많은 내용들이 출력 된다. 비밀번호를 찾기 위해서는 많은 내용 중에 millionth이라는 단어를 찾아야 한다. millionth 이라는 단어를 찾기 위해서 다음과 같은 명령어를 사용한다. grep -r 'mill.. 2. Over the Wire / Bandit Level 6 → 7 (리다이렉션, 파일 디스크립터) > Bandit Level 6 → Bandit Level 7 the password for the next level is stored somewhere on the server and has all of the following properties: 다음 레벨의 비밀번호는 서버 어딘가에 있고, 다음 속성을 포함하고 있다. owned by user bandit7 : 사용자가 bandit7 owned by group bandit6 : 그룹이 bandit6 33 bytes in size : 33 bytes인 파일 bandit6의 password를 입력한다. 위 조건을 충족 시키는 파일을 찾기 위해 다음과 같은 명령어를 사용했다 ( 명령어 find는 옵션 중첩이 가능하다 ) find / -user bandit.. 1. Over the Wire / Bandit (리눅스 명령어 연습) > Bandit Level 1 -> Bandit Level 2 Bandit Level 2 -> Bandit Level 3 . . (생략) Bandit Level 3 -> Bandit Level 4 The password for the next level is stored in hidden file in the inhere directory. 다음 레벨의 비밀번호는 inhere 디렉토리 안 숨겨진 파일에 있다. bandit3의 password를 입력한다. ls 현재 위치의 파일 목록 조회 ( 남청색 : 디렉토리 ) ls -a 숨겨진 파일, 디렉토리를 함께 보여줌 cd inhere inhere 디렉토리로 이동 pwd 현재 위치 확인 cat .hidden .hidden 파일 내용 출력 더보기 ls -[옵션] .. 이전 1 2 다음