|
网页木马大部分密码都是明文得,不过也有用md5得,也好,可以很容易破解,最主要是不标准网马加密,密码一般加密后只有加密代码,没有解密,我收集了一些(不断补充).
function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
Dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
encrypt = texts
end function
=============在某cms系统管理员密码中使用,如"2375;7?" 解密后1141618
海洋顶端:
加密,保存成vbs
========================
Dim theStr
theStr = InputBox("请输入要加密的字串")
If theStr <> "" Then
Call InputBox("请复制已经加密好的字串",,Encode(theStr))
End If
Function Encode(strPass)
Dim i, theStr, strTmp
' for循环得到密码各个字符的ascii值,每位值都在0~9
For i = 1 To Len(strPass)
strTmp = Asc(Mid(strPass, i, 1))
theStr = theStr & Abs(strTmp)
Next
strPass = theStr
theStr = ""
' 如果前面得到的值位数大于16就进入JoinCutStr函数处理,使之小于16
Do While Len(strPass) > 16
strPass = JoinCutStr(strPass)
Loop
' 这个for循环处理每个字符,把7、8、9转为C、D、E,其余不变
For i = 1 To Len(strPass)
strTmp = CInt(Mid(strPass, i, 1))
strTmp = IIf(strTmp > 6, Chr(strTmp + 60), strTmp)
theStr = theStr & strTmp
Next
Encode = theStr
End Function
' JoinCutStr函数把奇数位和偶数位的ascii相加整除2得到新字符,取值在0~9
Function JoinCutStr(str)
Dim i, theStr
For i = 1 To Len(str)
If Len(str) - i = 0 Then Exit For
theStr = theStr & Chr(CInt((Asc(Mid(str, i, 1)) + Asc(Mid(str, i + 1, 1))) / 2))
i = i + 1
Next
JoinCutStr = theStr
End Function
' VB的(a>b)?a:b
Function IIf(var, val1, val2)
If var = True Then
IIf = val1
Else
IIf = val2
End If
End Function
解密(保存为vbs):
==================
theStr = InputBox("输入加密后的字串")
If theStr <> "" Then
Call InputBox("请复制已经解密的字串",,UnEncode(theStr))
End If
Function UnEncode(str)
For i = 1 To Len(str)
theStr1 = Mid(str, i, 1)
If theStr1 = "C" Then
theStr1 = "7"
ElseIf theStr1 = "D" Then
theStr1 = "8"
ElseIf theStr1 = "E" Then
theStr1 = "9"
End If
StrPass2 = StrPass2 & theStr1
Next
StrPass3 = GetChr(StrPass2)
UnEncode = StrPass3
End Function
Function GetChr(str)
For i = 1 To Len(str)
ASCStr = Mid(str, i, 1)
MyStr = MyStr & ASCStr
If MyStr > 32 and MyStr < 127 Then
StrResult = StrResult & Chr(MyStr)
MyStr = ""
Else
If i = Len(str) Then
GetChr = "小虾无能,不能破解"
exit function
End If
End If
Next
GetChr = StrResult
End Function
|
|