| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 491 人关注过本帖
标题:现有一ASP的加密代码,求对应原解密代码!
只看楼主 加入收藏
amwihfku
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-2-25
结帖率:0
收藏
已结贴  问题点数:10 回复次数:3 
现有一ASP的加密代码,求对应原解密代码!
<%
password="abc"
li_ch=""
ls_result = ""
for li_pos = 1 to len(password)
    li_ch = asc(mid(password,li_pos,1))
    if li_pos mod 6=1 then
            li_ch = li_ch + asc("z") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("z") - li_pos
            end if
    elseif li_pos mod 6=2 THEN
            li_ch = li_ch + asc("Y") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("Y") - li_pos
            end if
    elseif li_pos mod 6=3 THEN
            li_ch = li_ch + asc("1") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("1") - li_pos
            end if
    elseif li_pos mod 6=4 THEN
            li_ch = li_ch + asc("@") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("@") - li_pos
            end if
    elseif li_pos mod 6=5 THEN
            li_ch = li_ch + asc("!") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("!") - li_pos
            end if
    elseif li_pos mod 6=0 THEN
            li_ch = li_ch + asc("6") + li_pos
            if li_ch mod 128 = 0 then
                li_ch = asc("6") - li_pos
            end if
    end IF
    li_ch = li_ch mod 128
    li_ch = li_ch mod 26 + 65
    ls_result = ls_result + trim(chr(li_ch))
next
response.write "密码="&ls_result
%>
搜索更多相关主题的帖子: password 
2011-05-27 11:04
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:5 
不是所有加密过程,都能解密。

----我怎能在别人的苦难面前转过脸去----
2011-05-27 11:06
amwihfku
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2006-2-25
收藏
得分:0 
我顶,高手们帮帮
2011-05-27 11:26
mgmt_asp
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:124
专家分:158
注 册:2009-7-26
收藏
得分:5 
程序代码:
Function revert(str)
Dim i,j,x,y,i_mod,min,max
For i=1 To Len(str)
i_mod=i Mod 6
Select Case i_mod
Case 1
y="z"
Case 2
y="Y"
Case 3
y="1"
Case 4
y="@"
Case 5
y="!"
Case 0
y="6"
End Select
min=i+Asc(y)+97
max=i+Asc(y)+122
For j=min To max
x=j Mod 128 Mod 26
If x=Asc(Mid(str,i,1))-65 Then
revert=revert&Chr(j-Asc(y)-i)
End If
Next
Next
End Function
这个可以解26个小写字母组成的密码,长度不限

[ 本帖最后由 mgmt_asp 于 2011-5-29 15:30 编辑 ]
2011-05-29 13:03
快速回复:现有一ASP的加密代码,求对应原解密代码!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.033556 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved