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í)
主站蜘蛛池模板:
漠河县|
西平县|
山丹县|
静海县|
通州区|
五指山市|
金华市|
石屏县|
日喀则市|
青州市|
嘉祥县|
重庆市|
普洱|
台南市|
南京市|
博罗县|
文化|
乌兰县|
临潭县|
县级市|
进贤县|
浮梁县|
桂东县|
大厂|
舒兰市|
当阳市|
鄂温|
开远市|
莫力|
宁武县|
通州市|
图们市|
霍邱县|
宣城市|
留坝县|
苍梧县|
株洲县|
通辽市|
河北区|
涞源县|
泗水县|