¾Æ~ÁÖ ¿¾³¯ »çÀÌÆ®Àε¥ °©Àڱ⠿äûÀÌ ¿À³×¿ä.
ȸ¿ø°¡ÀÔ ÆäÀÌÁöÀε¥ ÀÚ¹Ù½ºÅ©¸³Æ®·Î ·Î±×ÀÎüũ¸¦ ÇÏ°í Á¶ÀÎproc ÆäÀÌÁö·Î ³Ñ±â´Âµ¥
ÃÖ´ëÇÑ ½ÉÇÃÇÏ°Ô ÀÚ¹Ù½ºÅ©¸³Æ®¿¡¼ ¾ÏÈ£ÈÇؼ º¸³»°í asp·Î ÀÎÄÚµùÇÒ·Á°í ÇÕ´Ï´Ù.
¾Æ·¡´Â °£´ÜÇÑ ¼Ò½ºÀε¥ ¾î¶»°Ô º¯ÇüÀ» ÇؾßÇÏ´ÂÁö ¾Ë·ÁÁÖ½Ã¸é °í¸¿°Ú½À´Ï´Ù.
join.asp
<script language="javascript">
// ·Î±×ÀÎÆû À¯È¿¼º °Ë»ç
function chklogin(){
//¾ÏÈ£È
//var cipherText = Encrypt(a1, "passwd", 128);
//var origText = Decrypt(cipherText, "passwd", 128);
//alert("cipherText="+cipherText + " origText="+ origText);
var frm = document.join;
var str_in;
var num_out = "";
if(frm.user_id.value==''){
alert('¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä.');
frm.user_id.focus();
return;
}
if(frm.user_pw.value==''){
alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä.');
frm.user_pw.focus();
return;
}
str_in = frm.user_pw.value;
for(i = 0; i < str_in.length; i++) {
num_out += str_in.charCodeAt(i) - 23;
}
//alert(num_out);
//return;
//frm.user_pw.value = CryptoJS.AES.encrypt(text, key);
var pw = frm.user_pw.value
var user_pw = Encrypt(pw);
frm.user_pw.value = user_pw;
frm.submit(); //join_process·Î À̵¿ >>
}
//function Encrypt(theText) {
// output = new String;
// Temp = new Array();
// Temp2 = new Array();
// TextSize = theText.length;
// for (i = 0; i < TextSize; i++) {
// rnd = Math.round(Math.random() * 122) + 68;
// Temp[i] = theText.charCodeAt(i) + rnd;
// Temp2[i] = rnd;
// }
// for (i = 0; i < TextSize; i++) {
// output += String.fromCharCode(Temp[i], Temp2[i]);
// }
// return output;
//}
function Encrypt(theText) {
output = new String;
Temp = new Array();
Temp2 = new Array();
TextSize = theText.length;
for (i = 0; i < TextSize; i++) {
rnd = Math.round(Math.random() * 122) + 68;
Temp[i] = theText.charCodeAt(i) + rnd;
Temp2[i] = rnd;
}
for (i = 0; i < TextSize; i++) {
output += String.fromCharCode(Temp[i], Temp2[i]);
}
return output;
}
</script>
join_proc.asp
<script src="/js/security.js"></script>
<%
user_id = Fillter(request("user_id")) '³Ñ¾î¿Â ¾ÆÀ̵ð
user_pw = Fillter(request("user_pw")) '³Ñ¾î¿Â Æнº¿öµå
'response.write user_pw
'response.end
%>
<scRIPT LANGUAGE="Javascript">
<!--
function unEncrypt(theText) {
output = new String;
Temp = new Array();
Temp2 = new Array();
TextSize = theText.length;
for (i = 0; i < TextSize; i++) {
Temp[i] = theText.charCodeAt(i);
Temp2[i] = theText.charCodeAt(i + 1);
}
for (i = 0; i < TextSize; i = i+2) {
output += String.fromCharCode(Temp[i] - Temp2[i]);
}
return output;
}
document.write unEncrypt('<%=user_pw%>');
//-->
</scRIPT>
<%
'user_pw = "<script>document.write(unEncrypt(user_pw));</script>"
response.write user_pw & "----" & URLDecode(user_pw) & "Á¦¹ß³ª¿Í¶ó"
response.end
%>
À§¿Í°°ÀÌ Çغôµ¥ µµÀúÈ÷ ¾È³ª¿À³×¿ä ¤Ð
|
frm.user_pw.value = escape(user_pw);
proc asp¿¡¼±
unescape(request("user_pw"))
Çغ¸¼¼¿ä~~~