프로그래밍 언어/Shell
Bandit Level 2 해설
트리맨스
2022. 12. 27. 10:20
반응형
❗️모든 문제는 Mac 기준으로 풀이합니다❗️
Bandit Level 2 문제를 풀어 보자. 문제를 요약해 보자.
문제
파일 이름은 "-" 이다. 해당 파일안에 암호가 있다.
해설
대시는 기본 파일 입출력에서 dev/stdin 또는 dev/stdout으로 인식할 수도 있다. 해당 파일을 열기 위해서는 전체 위치까지 지정해 주어야 한다.
정답
cat ./-
# 또는
cat < -
참고자료
https://stackoverflow.com/questions/42187323/how-to-open-a-dashed-filename-using-terminal
https://tldp.org/LDP/abs/html/special-chars.html
반응형