QYCity - 2010-6-11 20:45:00
:kaka12:我自己改的文本加密,谁破解出来奖励人民币100以下为加密后的文本代码
B8909A5E3A951B0A1290269D0B45F3CBD93B6D2B447539670545D86AFFCF5781AF9C3D7347453C6645697C4579667D6982456F611A850F88D059D09E2F95A9771171E68E1ECB6733200D89948ACFE68E6370913F6D8C22A8724F909E55AC60097144C5ACA80F3E784D432B93713A7A5020326D756F4AFA3B8AFB5F7C2171BABE0735C33EC97051581637D44E9BABC54257785A31514C384947CB6E667A85E93A9B6766B3293652AC6A854D63C759354EF535DE3262FBD85F9588160F14087D13AD00C2DE7335C49C8BEE64F1879477830A6B0F382584D69E4B52990FFBCA3D734745307846737C4579667D69B890C64F1336E68E6AC3F80BF66A1539D59B812B50688C6077455C788D632584D09262CF7745776276670F882474E539110B43762BDFAD4E426466766F3B5F7F426CCD3B3DCB7E646A85FF55BB3AF93A5F7C3E5481BB2644FA397441A0555542E25AFF55D031FA3AD979C03287B141CBAE38CA74515874F1004865387C0F1E75D970314B223AA6AC9639655F6D3CD0CEE5994E516B604223AA8E247B1A6AE68E920F54F7CD833A9DA14D2F95F10A464BF9E0AF676D9BDF0CDD914D730F459C9931690C549C664169EF89DD3F7F7582456D66548B336A403ED43AE09041CB7DC1AC87EE6BD831E0955943D33A888CFF376838
用户系统信息:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Maxthon/3.0.11.8 Safari/533.1
最硬的石头 - 2010-6-11 20:53:00
鬼知道你这是什么算法,我猜是RSA,因为资料比较多。
RSA的话,即使你放n和e别人也是搞不出的
is猫咪吖 - 2010-6-11 20:55:00
看不懂,转成16进制了?
haiyoushui - 2010-6-11 22:19:00
该用户帖子内容已被屏蔽
QYCity - 2010-6-12 0:56:00
:kaka12: 使用用asp加密函数 XOR_DES
:kaka12: 不过使用的key是用中文的哈
tianxunmycool - 2010-6-12 1:42:00
看起来有点像MD5,不过没解过这么长的
如果是ESCAPE或JS/VB的简单加密,我可以解
ASP中可以实现RSA加密和解密,:根据RSA
这个好像功力不够,惭愧
根据前辈资料整理出在asp中加密与解密函数
rsa.asp
<%
rem 在ASP中实现加密与解密,加密方法:根据RSA
rem 联系:admin#boaichina.com (请将#换成@)
Class clsRSA
Public PrivateKey
Public PublicKey
Public Modulus
Public Function Crypt(pLngMessage, pLngKey)
On Error Resume Next
Dim lLngMod
Dim lLngResult
Dim lLngIndex
If pLngKey Mod 2 = 0 Then
lLngResult = 1
For lLngIndex = 1 To pLngKey / 2
lLngMod = (pLngMessage ^ 2) Mod Modulus
' Mod may error on key generation
lLngResult = (lLngMod * lLngResult) Mod Modulus
If Err Then Exit Function
Next
Else
lLngResult = pLngMessage
For lLngIndex = 1 To pLngKey / 2
lLngMod = (pLngMessage ^ 2) Mod Modulus
On Error Resume Next
' Mod may error on key generation
lLngResult = (lLngMod * lLngResult) Mod Modulus
If Err Then Exit Function
Next
End If
Crypt = lLngResult
End Function
Public Function Encode(ByVal pStrMessage)
Dim lLngIndex
Dim lLngMaxIndex
Dim lBytAscii
Dim lLngEncrypted
lLngMaxIndex = Len(pStrMessage)
If lLngMaxIndex = 0 Then Exit Function
For lLngIndex = 1 To lLngMaxIndex
lBytAscii = Asc(Mid(pStrMessage, lLngIndex, 1))
lLngEncrypted = Crypt(lBytAscii, PublicKey)
Encode = Encode & NumberToHex(lLngEncrypted, 4)
Next
End Function
Public Function Decode(ByVal pStrMessage)
Dim lBytAscii
Dim lLngIndex
Dim lLngMaxIndex
Dim lLngEncryptedData
Decode = ""
lLngMaxIndex = Len(pStrMessage)
For lLngIndex = 1 To lLngMaxIndex Step 4
lLngEncryptedData = HexToNumber(Mid(pStrMessage, lLngIndex, 4))
lBytAscii = Crypt(lLngEncryptedData, PrivateKey)
Decode = Decode & Chr(lBytAscii)
Next
End Function
Private Function NumberToHex(ByRef pLngNumber, ByRef pLngLength)
NumberToHex = Right(String(pLngLength, "0") & Hex(pLngNumber), pLngLength)
End Function
Private Function HexToNumber(ByRef pStrHex)
HexToNumber = CLng("&h" & pStrHex)
End Function
End Class
%>
test.asp
<!--#INCLUDE FILE="RSA.asp"-->
<%
function Encryptstr(Message)
Dim LngKeyE
Dim LngKeyD
Dim LngKeyN
Dim StrMessage
Dim ObjRSA
LngKeyE = "32823"
LngKeyD = "20643"
LngKeyN = "29893"
StrMessage = Message
Set ObjRSA = New clsRSA
ObjRSA.PublicKey = LngKeyE
ObjRSA.Modulus = LngKeyN
Encryptstr = ObjRSA.Encode(StrMessage)
Set ObjRSA = Nothing
end function
function decryptstr(Message)
Dim LngKeyE
Dim LngKeyD
Dim LngKeyN
Dim StrMessage
Dim ObjRSA
LngKeyE = "32823"
LngKeyD = "20643"
LngKeyN = "29893"
StrMessage = Message
Set ObjRSA = New clsRSA
ObjRSA.PrivateKey =LngKeyD
ObjRSA.Modulus=LngKeyN
decryptstr=ObjRSA.Decode(StrMessage)
Set ObjRSA = Nothing
end function
dim last,first
first="sohu"
Response.Write "加密前为:"&first
last=Encryptstr(first)
Response.Write "加密后为"&last
Response.Write "解密后为" &decryptstr(last)
%>
QYCity - 2010-6-12 14:52:00
:kaka5: ESCAPE或JS/VB的简单加密
这个根本算不上加密的
:kaka12: 我用的加密函数送上哈
Function XOR_ENS(Source, Key) '加密函数
Dim i, iKey, iKeyLen
Dim SSA, SSB, SSS
Dim XOR_STR_A
Select Case Len(Source)
Case 1
Source = Source & Chr(32) & Chr(32) & Chr(32) & Chr(32)
Case 2
Source = Source & Chr(32) & Chr(32) & Chr(32)
Case 3
Source = Source & Chr(32) & Chr(32)
Case 4
Source = Source & Chr(32)
End Select
XOR_STR_A = ""
iKeyLen = Len(Key)
iKey = 1
'Source = StrConv(Source, vbFromUnicode)
For i = 1 To LenB(Source)
SSA = CInt(AscB(MidB(Source, i, 1)))
SSB = CInt(Asc(Mid(Key, iKey, 1)))
iKey = iKey + 1
If iKey > iKeyLen Then
iKey = 1
End If
SSS = SSA Xor SSB
XOR_STR_A = XOR_STR_A & Right("0" & Hex(SSS), 2)
Next
XOR_ENS = XOR_STR_A
XOR_ENS = Replace(XOR_ENS, "1", "*")
XOR_ENS = Replace(XOR_ENS, "9", "1")
XOR_ENS = Replace(XOR_ENS, "*", "9")
XOR_ENS = Replace(XOR_ENS, "8", "#")
XOR_ENS = Replace(XOR_ENS, "2", "8")
XOR_ENS = Replace(XOR_ENS, "#", "2")
XOR_ENS = Replace(XOR_ENS, "4", "#")
XOR_ENS = Replace(XOR_ENS, "7", "4")
XOR_ENS = Replace(XOR_ENS, "#", "7")
XOR_ENS = Replace(XOR_ENS, "3", "#")
XOR_ENS = Replace(XOR_ENS, "6", "3")
XOR_ENS = Replace(XOR_ENS, "#", "6")
XOR_ENS = Replace(XOR_ENS, "D", "#")
XOR_ENS = Replace(XOR_ENS, "F", "D")
XOR_ENS = Replace(XOR_ENS, "#", "F")
XOR_ENS = Replace(XOR_ENS, "A", "#")
XOR_ENS = Replace(XOR_ENS, "B", "A")
XOR_ENS = Replace(XOR_ENS, "#", "B")
End Function
Function XOR_DES(Source, Key) ' 解密函数
Dim i, iKey, iKeyLen
Dim SSA, SSB, SSS
Dim XOR_STR_A
XOR_STR_A = ""
iKeyLen = Len(Key)
iKey = 1
XOR_STR_A = ""
Source = Replace(Source, "1", "*")
Source = Replace(Source, "9", "1")
Source = Replace(Source, "*", "9")
Source = Replace(Source, "8", "#")
Source = Replace(Source, "2", "8")
Source = Replace(Source, "#", "2")
Source = Replace(Source, "4", "#")
Source = Replace(Source, "7", "4")
Source = Replace(Source, "#", "7")
Source = Replace(Source, "3", "#")
Source = Replace(Source, "6", "3")
Source = Replace(Source, "#", "6")
Source = Replace(Source, "D", "#")
Source = Replace(Source, "F", "D")
Source = Replace(Source, "#", "F")
Source = Replace(Source, "A", "#")
Source = Replace(Source, "B", "A")
Source = Replace(Source, "#", "B")
For i = 1 To Len(Source) Step 2
SSA = CInt("&H"&(Mid(Source, i, 2))&"")
SSB = (Asc(Mid(Key, iKey, 1)))
iKey = iKey + 1
If iKey > iKeyLen Then
iKey = 1
End If
SSS = SSA Xor SSB
XOR_STR_A = XOR_STR_A & ChrB(SSS)
Next
'XOR_DES = StrConv(XOR_STR_A, vbUnicode)
XOR_DES = replace(XOR_STR_A,vbcrlf,"",lenB(XOR_STR_A)-4)
xor_des=trim(XOR_STR_A)
xor_des=cstr(xor_des)
End Function
'产生密钥算法
Function KeyGeN(iKeyLength)
Dim k, iCount, strMyKey
lowerbound = 35
upperbound = 96
Randomize
For i = 1 To iKeyLength
k = Int(((upperbound - lowerbound) + 1) * Rnd + lowerbound)
strMyKey = strMyKey & Chr(k) & ""
Next
KeyGeN = strMyKey
End Function
© 2000 - 2026 Rising Corp. Ltd.