[etc] 태그 스크립트 암호화하기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[etc] 태그 스크립트 암호화하기

페이지 정보

본문

<html>
<head>
<title>예제</title>
<script>

msg = false;
dum = 1;
        //-- dum 은 1 에서 5 까지 취향에 맞게 선택하세요
        //-- 이 숫자가 0 이면 암호화가 되지 않습니다.
        //-- 1에서 5정도가 적당합니다..
             
function encode()  {
        myObj = document.myform.aaa;
        str = escape(myObj.value);
        end_num = str.length - 1;
        encode_str = '';
 
        befstr =  '<html><head><title></title><sc'
                + 'ript>str2 = "'
        aftstr =  '";eh = "";for(k=0;k<str2.length;k++)'
                + '{eh+=String.fromCharCode(str2.charCodeAt(k) - ' + dum + ');}'
                + 'document.write(unescape(eh));</scr'
                + 'ipt><body></body></html>'



        for(i=0;i<=end_num;i++)  {
          //if(str.charCodeAt(i)==9) i++;
          key = 1*str.charCodeAt(i) + dum;
          encode_str += String.fromCharCode(key);
          }
        document.myform.aaa.value = befstr + encode_str + aftstr;
        }


function getstr(value)  {

  var cs = document.myform.aaa.value;
  var str_num = cs.indexOf(value);   
  return str_num;         
  }
   

function decode()  {

  myObj = document.myform.aaa;
  str = myObj.value;
  //dum = 40000;
  //-- 위에 덤이랑 같은 숫자로...^..^
  decode_str = '';
  str_start = getstr('str2 = "') + 'str2 = "'.length;
  str_end = getstr('";eh');
  for(i=str_start;i<str_end;i++)  {
      key = 1*str.charCodeAt(i) - dum;
      decode_str += String.fromCharCode(key);
      }
  document.myform.aaa.value = unescape(decode_str);
}

function view_source()  {
  abab = prompt('페이지의 주소를 써 넣으세요','http://');
  window.location = 'view-source:' + abab;
  }
</script>


</head>
<body bgcolor=#aaaaaa>

<form name=myform>
<table border=1>
<tr><td>
<textarea name=aaa ROWS=15 COLS=50></textarea>
</td>
</tr>
<tr>
<td align=center>
<input type=button name=ccc value='인코딩' onclick='encode();'>
<input type=button          value='디코딩' onclick='decode();'>
<input type=reset name=ddd value='다시'>
<input type=button value='소스불러오기' onclick='view_source();'>
</td></tr>

</table>
</form> 
</body>
</html>

추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 12 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
550 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15717 0 10-10
549 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15703 0 06-02
548 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15693 0 04-22
547 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15692 0 10-08
546 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15688 0 10-16
545 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15672 0 06-07
544 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15622 0 05-31
543 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15571 0 04-10
542 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15570 0 11-01
541 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15563 0 04-24
540 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15559 0 10-16
539 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15555 0 12-18
538 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15549 0 03-20
537 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15548 0 12-05
536 월드컵쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15545 0 07-06
535 메빅맨쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15544 0 09-19
534 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15540 0 06-15
533 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15501 0 03-06
열람중 포인트쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15495 0 05-07
531 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15481 0 07-27
530 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15479 0 03-25
529 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15467 0 09-12
528 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15462 0 03-19
527 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15425 1 04-01
526 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15403 0 06-27

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
7,865
어제
7,241
최대
7,865
전체
1,414,416
Copyright (c) 株式会社YHPLUS. All rights reserved.