vbs版的解密base64加密的腳本
更新時(shí)間:2008年02月22日 16:03:21 作者:
vbs版的解密base64加密的腳本
復(fù)制代碼 代碼如下:
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
vbs代碼打包
相關(guān)文章
用vbs更改 Internet Explorer 的標(biāo)題欄
用vbs更改 Internet Explorer 的標(biāo)題欄...2007-03-03注冊表-批處理-VBS之間的相互結(jié)合應(yīng)用
注冊表-批處理-VBS之間的相互結(jié)合應(yīng)用...2007-10-10VBS教程:VBscript語句-If...Then...Else 語句
If...Then...Else 語句用于計(jì)算條件是否為 True 或 False,并且根據(jù)計(jì)算結(jié)果指定要運(yùn)行的語句。通常,條件是使用比較運(yùn)算符對值或變量進(jìn)行比較的表達(dá)式。If...Then...Else 語句可以按照需要進(jìn)行嵌套2006-11-11海陽頂端網(wǎng)進(jìn)百度blog必須輸入密碼的vbscript代碼
今天訪問haiyangtop官方網(wǎng)站,發(fā)現(xiàn)他的blog必須要輸入密碼所以我給出下面的代碼2008-06-06VBScript 打造自己的遠(yuǎn)程CMDShell附使用教程
這個(gè)cmdshell需要結(jié)合nc進(jìn)行配合使用,現(xiàn)在肉雞上執(zhí)行cmdshell然后在本地上面運(yùn)行nc,注意看下面的參數(shù)2013-07-07