-
[WarGame] Bandit, Level 6 → Level 7워게임 2023. 3. 19. 19:29
[WarGame] Bandit, Level 6 → Level 7
Problem
user가 bandit7이고, group이 bandit6이며 size가 33바이트인 파일을 찾으면 된다.find --help로 옵션 확인하면 금방 될 듯 합니다.Solving
bandit6@bandit:~$ find --help | grep user -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN -used N -user NAME -xtype [bcdpfls] -context CONTEXT bandit6@bandit:~$ find --help | grep group -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN https://savannah.gnu.org/bugs/?group=findutils or, if bandit6@bandit:~$ find --help | grep size -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N bandit6@bandit:~$ cat `find /* -user bandit7 -group bandit6 -size 33c 2>/dev/null` z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S
- 2>/dev/null : return code (2) 오류인 경우, 제거함
- ` ~~~ ` : backtic 내부의 코드는 먼저 실행
Refer
반응형'워게임' 카테고리의 다른 글
[WarGame] Bandit, Level 8 → Level 9 (0) 2023.03.19 [WarGame] Bandit, Level 7 → Level 8 (0) 2023.03.19 [WarGame] Bandit, Level 5 → Level 6 (0) 2023.03.19 [WarGame] Bandit, Level 4 → Level 5 (0) 2023.03.19