๋ฆฌ๋ฒ์ฑ - Bush hid the facts, ์๋์ฐ XP ๋ฉ๋ชจ์ฅ ๋ฒ๊ทธ
๋ฌธ์ ํ์ธ
1. ๋ฉ๋ชจ์ฅ์ ์๋ก ๋ง๋ค์ด์ ์์ "Bush hid the facts"๋ฅผ ์ ๋ ฅํ๋ค.
"๋ถ์ ๋ํต๋ น์ ์ง์ค์ ์จ๊ธฐ๊ณ ์๋ค"๋ผ๋ ๋ป์ ์ฌ์คํ(?) ๋ด์ฉ์ด๋ค.
2. ๋ฉ๋ชจ์ฅ์ ์ ์ฅํ ํ์ ๋ค์ ํ์ผ์ ๋ด์ฉ์ ๋ค์ฌ๋ค๋ณธ๋ค.
๊ทธ๋ฌ์ ๋ณธ๋ ๋ด์ฉ์ด ์์ด์ง๊ณ ๊ธ์๊ฐ ๊นจ์ ธ์ ๋์จ๋ค.
๋ฌธ์ ๋ถ์
1. ํน์๋ ๋ฉ๋ชจ์ฅ์์ ๋ฐ์ํ๋ ์ค๋ฅ ์๋๊น ํ๊ณ cmd ์ฐฝ์์ type ๋ช ๋ น์ด๋ก ํ์ผ์ ๋ด์ฉ์ ํ์ธํด ๋ณด์๋ค.
ํ์ธํด๋ณธ ๊ฒฐ๊ณผ ์ค์ ํ์ผ์ ๋ด์ฉ์ ๊ทธ๋๋ก์ธ๊ฑธ ๋ณด์ ๋ฉ๋ชจ์ฅ์์ ์๊ธฐ๋ ์ค๋ฅ์ธ ๊ฒ์ด๋ค.
2. ๊นจ์ง ํ์ผ์ (B.txt๋ก) ์ ์ฅํ๊ณ ํฅ์ค ์๋ํฐ๋ก ๋ถ์ํด๋ณธ๋ค.
๋ถ์์ ํด๋ณด๋ฉด ์๋ณธ์ธ A.txt๋ ๋ด์ฉ์ด ์ ์ ์ฅ๋์๋ ๋ฐ๋ฉด B.txt๋ ๋ด์ฉ ์์ FF FE๋ผ๋ ํ์ผ ํค๋๊ฐ ๋ค์ด๊ฐ๊ฒ ๋๋ค.
ํ์ธํด ๋ณธ ๊ฒฐ๊ณผ FF FE๋ UTF-16๋ฅผ ์๋ฏธํ๋ ํ์ผ ํค๋์ธ ๊ฒ์ผ๋ก ํ์ธ ๋๋ค. (https://en.wikipedia.org/wiki/Byte_order_mark)
UTF-16 ๋ฌธ์๋ 2๋ฐ์ดํธ์ฉ ๊ธ์๋ฅผ ๋ฌถ๊ธฐ ๋๋ฌธ์ B์ u๋ฅผ ์๋ฏธํ๋ ANSI ๊ฐ 0x42์ 0x75๋ฅผ ํ๋์ ๋ฌธ์์ธ 0x4275๋ก ์ธ์ํ ๊ฒ์ด๋ค.
๊ฑฐ๊ธฐ๋ค ๋ฆฌํ์๋์ธ ๋ฐฉ์์ธ ์ด์ ๋ก ํ์ผ์ ์ฝ์ ๋ 0x7542 ์ด๋ ๊ฒ ๋ฐ์ดํธ ์์ ์๋ค๊ฐ ๋ฐ๋๋ค.
B u => 42 75 => 7542
s h => 73 68 => 6873
(๊ณต๋ฐฑ) h => 20 68 => 6820
i d => 69 64 => 6469
(๊ณต๋ฐฑ) t => 20 74 => 7420
h e => 68 65 => 6568
(๊ณต๋ฐฑ) f => 20 66 => 6622
a c => 61 63 => 6361
t s => 74 73 => 7374
๋ฉ๋ชจ์ฅ์ ์ ์ฅ๋ ๋ฌธ์๋ค์ ์ ๋์ฝ๋๋ฅผ ์ถ์ถํด๋ณด๋ ์์๊ณผ ์ ํํ๊ฒ ์ผ์นํ๋ ๊ฒ์ ํ์ธํ ์ ์์๋ค.
๋ฌธ์ ์์ธ
๋ฌธ์ ์์ธ์ผ๋ก๋ ์๋์ฐ API ํจ์์ธ IsTextUnicode๊ฐ ๋ฌธ์ ๋ผ๊ณ ํ๋ค. ์ฌ์ค bush hid the facts ์ธ์๋ ๋น์ทํ 4-3-3-5 ๊ธธ์ด์ ๋ฌธ์๋ค ์ผ๋ถ๋ ์ด์ ๋ฒ๊ทธ๊ฐ ๋ฐ์ํ๋ค๊ณ ํ๋ค. ์ด ๋ฉ๋ชจ์ฅ ์ค๋ฅ๋ Windows XP, Windows 2000์์๋ง ๋ณผ ์ ์๋ค.
๋์์ ์ค ์ฌ์ดํธ๋ค:
https://dencode.com/string/hex
https://unicodemap.org/search.asp
์ฐธ๊ณ :
https://ko.wikipedia.org/wiki/Bush_hid_the_facts
https://namu.wiki/w/bush%20hid%20the%20facts
https://www.youtube.com/watch?v=sPShnuBSvBg