CopyCode The Code is as follows: if not wscript. Arguments. Count = 1 then wscript. Echo "drag the vbs file to be converted to me! ": Wscript. Quit
Set FSO = Createobject ("scripting. FileSystemObject ")
Set Self = FSO. opentextfile (wscript. scriptfullname)
Set vbs = FSO. createtextfile (left (wscript. Arguments (0), Len (wscript. Arguments (0)-4) + "_ xorencode. vbs ")
Do until self. atendofstream
Aline = self. Readline
If Aline = "function decode (S, N)" then W = true
If W then vbs. writeline Aline
Loop
Set src = FSO. opentextfile (wscript. Arguments (0 ))
Randomize: N = int (255 * RND + 1)
Vbs. writeline "execute (" & "decode (" "& encode (SRC. read (FSO. getFile (wscript. arguments (0 )). size), n) & "", "& N &"))"
SRC. Close: vbs. Close: Self. Close
Set src = nothing: Set vbs = nothing: Set Self = nothing: Set FSO = nothing
Wscript. Echo "successful! "
Function encode (S, N)
For I = 1 to Len (s)
Encode = encode & "& (ASC (mid (S, I, 1) XOR N)
Next
End Function
Function decode (S, N)
NS = Split (mid (S, 2, Len (S)-1 ))
For I = 0 to ubound (NS)
Decode = Decode & CHR (CINT (NS (I) XOR N)
Next
End Function