๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์›Œ๊ฒŒ์ž„2

[Dreamhack] Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿšบ Exercise: Welcome-Beginners ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ์„œ๋ฒ„ ์ƒ์„ฑ 2. ์ƒ์„ฑํ•œ ์„œ๋ฒ„๋กœ ์ ‘์†ํ•˜๊ธฐ ์ „, ๋ฌธ์ œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ํ›„ ์˜คํ”ˆ 3. ์‚ฌ์šฉ์ž๋กœ๋ถ€ํ„ฐ ์ž…๋ ฅ๋ฐ›์€ ๊ฐ’์ด "Dreamhack" ์ธ ๊ฒฝ์šฐ FLAG๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ถ€๋ถ„ ๋ฐœ๊ฒฌ char cmp_str[10] = "Dreamhack"; char inp_str[10]; printf("Enter \"Dreamhack\" : "); scanf("%9s", inp_str); if(strcmp(cmp_str, inp_str) == 0){ ใ…คใ…คputs("Welcome Beginners!"); ใ…คใ…ค// print flag ใ…คใ…คputs(flag); } 4. Ubuntu ๊ฐ€์ƒํ™˜๊ฒฝ์—์„œ nc ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„ ์ ‘์† --> "Drea.. 2023. 11. 25.
[Dreamhack] baby-linux ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด ๐Ÿคฑ baby-linux ๋“œ๋ฆผํ•ต ์›Œ๊ฒŒ์ž„ ๋ฌธ์ œ ํ’€์ด 1. ๋ฌธ์ œ ์„ค๋ช… ํ™•์ธ ํ›„ ์„œ๋ฒ„ ์ƒ์„ฑ 2. ์ƒ์„ฑํ•œ ์„œ๋ฒ„๋กœ ์ ‘์† --> ls ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ํ˜„์กดํ•˜๋Š” ํŒŒ์ผ ๋ชฉ๋ก ์ถœ๋ ฅ 3. cat ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด requirements.txt ํŒŒ์ผ ์˜คํ”ˆ --> ๋ณ„๋‹ค๋ฅธ ํžŒํŠธ๋ฅผ ๋ฐœ๊ฒฌํ•˜์ง€ ๋ชปํ•จ 4. cat ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด hint.txt ํŒŒ์ผ ์˜คํ”ˆ --> FLAG์˜ ๊ฒฝ๋กœ ๋ฐœ๊ฒฌ 5. ๋‹ค์‹œ cat ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด hello ํŒŒ์ผ์— ์ ‘๊ทผ ์‹œ๋„ --> No! ๋ฌธ์ž์—ด๊ณผ ํ•จ๊ป˜ ์ ‘๊ทผ ๊ฑฐ๋ถ€ echo $(cat ./dream/hack/hello/flag.txt) 6. app.py ํŒŒ์ผ์„ ์—ด์–ด ์†Œ์Šค์ฝ”๋“œ ํ™•์ธ 7. app.py ์ฝ”๋“œ ํ™•์ธ --> Line 13์—์„œ 'flag' ์šฉ์–ด ํ•„ํ„ฐ๋ง ์š”์†Œ ๋ฐœ๊ฒฌ #!/usr/bin/env python3 import .. 2023. 11. 23.