主页 > 知识库 > vbs base64 解密脚本代码

vbs base64 解密脚本代码

热门标签:智云亿呼电话机器人 企业400电话办理价钱低 机器人打电销适用于美业吗 外呼系统群 龙岩400电话申请 上海办理400电话选号 墨西哥地图标注app 天津智能外呼系统排名 外呼系统说话声音小怎么办

复制代码 代码如下:

Function fDecode(sStringToDecode)
'This function will decode a Base64 encoded string and returns the decoded string.
'This becomes usefull when attempting to hide passwords from prying eyes.
Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Dim iDataLength, sOutputString, iGroupInitialCharacter
sStringToDecode = Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")
iDataLength = Len(sStringToDecode)
If iDataLength Mod 4 > 0 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
For iGroupInitialCharacter = 1 To iDataLength Step 4
Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString
iDataByteCount = 3
iGroup = 0
For iCharacterCounter = 0 To 3
sCharacter = Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)
If sCharacter = "=" Then
iDataByteCount = iDataByteCount - 1
iData = 0
Else
iData = InStr(1, CharList, sCharacter, 0) - 1
If iData = -1 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
End If
iGroup = 64 * iGroup + iData
Next
iGroup = Hex(iGroup)
iGroup = String(6 - Len(iGroup), "0") iGroup
sPreliminaryOutString = Chr(CByte("H" Mid(iGroup, 1, 2))) Chr(CByte("H" Mid(iGroup, 3, 2))) Chr(CByte("H" Mid(iGroup, 5, 2)))
sOutputString = sOutputString Left(sPreliminaryOutString, iDataByteCount)
Next
fDecode = sOutputString
End Function

base64 测试代码:
复制代码 代码如下:

Function fDecode(sStringToDecode)
'This function will decode a Base64 encoded string and returns the decoded string.
'This becomes usefull when attempting to hide passwords from prying eyes.
Const CharList = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Dim iDataLength, sOutputString, iGroupInitialCharacter
sStringToDecode = Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")
iDataLength = Len(sStringToDecode)
If iDataLength Mod 4 > 0 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
For iGroupInitialCharacter = 1 To iDataLength Step 4
Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString
iDataByteCount = 3
iGroup = 0
For iCharacterCounter = 0 To 3
sCharacter = Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)
If sCharacter = "=" Then
iDataByteCount = iDataByteCount - 1
iData = 0
Else
iData = InStr(1, CharList, sCharacter, 0) - 1
If iData = -1 Then
fDecode = "Bad string passed to fDecode() function."
Exit Function
End If
End If
iGroup = 64 * iGroup + iData
Next
iGroup = Hex(iGroup)
iGroup = String(6 - Len(iGroup), "0") iGroup
sPreliminaryOutString = Chr(CByte("H" Mid(iGroup, 1, 2))) Chr(CByte("H" Mid(iGroup, 3, 2))) Chr(CByte("H" Mid(iGroup, 5, 2)))
sOutputString = sOutputString Left(sPreliminaryOutString, iDataByteCount)
Next
fDecode = sOutputString
End Function
msgbox fDecode("d3d3LmpiNTEubmV0")

需要测试加密的代码的朋友可以访问 https://www.jb51.net/tools/base64.htm

您可能感兴趣的文章:
  • Base64在线编码解码实现代码 演示与下载
  • asp base64加解密函数代码
  • vbs版的解密base64加密的脚本
  • 关于加密解密 Base64 and URL and Hex Encoding and Decoding
  • 关于base64加密/解密
  • JavaScript Base64编码和解码,实现URL参数传递。
  • Javascript base64编码实现代码

标签:阜新 齐齐哈尔 承德 丽水 青岛 锡林郭勒盟 黄山 鄂尔多斯

巨人网络通讯声明:本文标题《vbs base64 解密脚本代码》,本文关键词  vbs,base64,解密,脚本,代码,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《vbs base64 解密脚本代码》相关的同类信息!
  • 本页收集关于vbs base64 解密脚本代码的相关信息资讯供网民参考!
  • 推荐文章