우리는 이런 암호화된 소스를 만나게 되면 조금 당혹스러워진다.
<script language="javascript">document.write(unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E"));</script> ♬바람개비™
실행해 보자
♬바람개비™
어디서 많이 본것이다.
이제부터 풀어봅시다.
암호화된 소스
<script language="javascript">document.write(unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E\x20\x0D\x0A"));</script> ♬바람개비™
방법 1. document.write 대신
alert 을 넣어봅시다.
<script language="javascript">
alert(unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E"));</script> ♬바람개비™
alert 창 예제보기방법 2.
document.write("<xmp>"); 이것을 앞부분에 넣어봅시다
<script language="javascript">
document.write("<xmp>"); document.write(unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E"));
"</xmp>"</script> ♬바람개비™
결과 - <img src="http://combaduk.com.ne.kr/pic/baram.gif"> ♬바람개비™
방법 3. document.write(★unescape의 ★대신에
"<xmp>"+ 을 넣어봅시다
<script language="javascript">document.write(
"<xmp>"+ unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E"));</script> ♬바람개비™
</xmp>조금 쉽게한다면 document.write(★unescape의 ★대신에
"<xmp>"+ 이것만 넣으면 됩니다. 뒤에 붙는 </xmp> 을 생략한다면 조금쉽겠죠
<script language="javascript">document.write(
"<xmp>"+unescape("\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x62\x61\x64\x75\x6B\x2E\x63\x6F\x6D\x2E\x6E\x65\x2E\x6B\x72\x2F\x70\x69\x63\x2F\x62\x61\x72\x61\x6D\x2E\x67\x69\x66\x22\x3E"));</script> ♬바람개비™
결과 - <img src="http://combaduk.com.ne.kr/pic/baram.gif"> ♬바람개비™
이제 원하는 소스를 태그연습장에 복사해서 넣고 결과보기 하시면 됩니다.다른방법으로 인코딩된것도
document.write("<xmp>"); 이것을 앞부분에 넣어주면 되더군요
HTML Encoder 얻을수있는곳
http://blog.naver.com/sem7877.do?Redirect=Log&logNo=140003432743
( HTML Encoder는 한글 깨지는 문제가 발생합니다. )
출처 :
http://www.musictag.net/zboard/zboard.php?id=bang_baram&no=5