This script give you a decoded listing from an encoded file.
Supports *,je, ,vbe, .asp, .hta, .htm, .html…
If used under cscript, puts the result to stdout.
The file can be multi-encoded (many scripts in the file, for ex. in an html file)
Used under wscript, pops up the decoded file in a message box.
option explicit
Dim oArgs, NomFichier
'Optional argument : the encoded filename
NomFichier=""
Set oArgs = WScript.Arguments
Select Case oArgs.Count
Case 0 'No Arg, popup a dialog box to choose the file
NomFichier=BrowseForFolder("Choose an encoded file", &H4031, &H0011)
Case 1
If Instr(oArgs(0),"?")=0 Then '-? ou /? => aide
NomFichier=oArgs(0)
End If
Case Else
WScript.Echo "Too many parameters"
End Select
Set oArgs = NothingIf NomFichier<>"" Then
Dim fso
Set fso=WScript.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(NomFichier) Then
Dim fic,contenu
Set fic = fso.OpenTextFile(NomFichier, 1)
Contenu=fic.readAll
fic.close
Set fic=Nothing
Const TagInit="#@~^" '#@~^awQAAA==
Const TagFin="==^#~@" '& chr(0)
Dim DebutCode, FinCode
Do
FinCode=0
DebutCode=Instr(Contenu,TagInit)
If DebutCode>0 Then
If (Instr(DebutCode,Contenu,"==")-DebutCode)=10 Then 'If "==" follows the tag
FinCode=Instr(DebutCode,Contenu,TagFin)
If FinCode>0 Then
Contenu=Left(Contenu,DebutCode-1) & _
Decode(Mid(Contenu,DebutCode+12,FinCode-DebutCode-12-6)) & _
Mid(Contenu,FinCode+6)
End If
End If
End If
Loop Until FinCode=0
WScript.Echo Contenu
Else
WScript.Echo Nomfichier & " not found"
End If
Set fso=Nothing
Else
WScript.Echo "Please give a filename"
WScript.Echo "Usage : " & wscript.fullname & " " & WScript.ScriptFullName & " <filename>"
End If
Function Decode(Chaine)
Dim se,i,c,j,index,ChaineTemp
Dim tDecode(127)
Const Combinaison="1231232332321323132311233213233211323231311231321323112331123132"
Set se=WSCript.CreateObject("Scripting.Encoder")
For i=9 to 127
tDecode(i)="JLA"
Next
For i=9 to 127
ChaineTemp=Mid(se.EncodeScriptFile(".vbs",string(3,i),0,""),13,3)
For j=1 to 3
c=Asc(Mid(ChaineTemp,j,1))
tDecode(c)=Left(tDecode(c),j-1) & chr(i) & Mid(tDecode(c),j+1)
Next
Next
'Next line we correct a bug, otherwise a ")" could be decoded to a ">"
tDecode(42)=Left(tDecode(42),1) & ")" & Right(tDecode(42),1)
Set se=Nothing
- u盤無法識(shí)別怎么辦,小編告訴你U盤無法識(shí)別怎
- usb無線網(wǎng)卡怎么用,小編告訴你安裝教程
- usb調(diào)試在哪,小編告訴你usb調(diào)試在哪
- 優(yōu)盤不顯示,小編告訴你優(yōu)盤不顯示怎么辦
- 低級(jí)格式化,小編告訴你硬盤怎么低級(jí)格式化
- 分區(qū)表丟失,小編告訴你分區(qū)表丟失如何修復(fù)
- 進(jìn)入bios,小編告訴你戴爾筆記本進(jìn)入bios設(shè)置u
- 怎么刷bios,小編告訴你華碩怎么刷bios
- 讀卡器怎么用,小編告訴你如何使用讀卡器
- bios升級(jí),小編告訴你華碩主板bios怎么升級(jí)
主站蜘蛛池模板:
公安县|
桃江县|
巴林左旗|
花垣县|
台前县|
岢岚县|
文安县|
邵阳市|
新余市|
偏关县|
铅山县|
舟山市|
株洲县|
绩溪县|
萝北县|
哈巴河县|
开远市|
类乌齐县|
广州市|
哈密市|
柳林县|
龙陵县|
类乌齐县|
安化县|
青州市|
梅州市|
贵南县|
嘉义市|
孟连|
洪江市|
喀喇沁旗|
高陵县|
资兴市|
孟村|
仙桃市|
原平市|
济阳县|
东宁县|
鄂尔多斯市|
若羌县|
囊谦县|