1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
«Encrypt.vbs
set x = WScript.CreateObject("WScript.Shell") x = WScript.CreateObject ("WScript.Shell")
txt = inputbox("enter text to be encoded") txt = inputbox ("saisir du texte à coder")
msgbox encode(txt) encoder msgbox (txt)
x.Run "%windir%\notepad" x.Run "% windir% \ notepad"
wscript.sleep 1000 WScript.Sleep 1000
x.sendkeys encode(txt) encoder x.sendkeys (txt)
function encode(s) coder la fonction (s)
For i = 1 To Len(s) Pour i = 1 To Len (s)
newtxt = Mid(s, i, 1) newtxt = Mid (s, i, 1)
newtxt = Chr(Asc(newtxt)+3) newtxt = Chr (Asc (newtxt) +3)
coded = coded & newtxt code = code & newtxt
Next Prochain
encode = coded encoder = codé
End Function End Function
«Decrypt.vbs
set x = WScript.createobject("wscript.shell") x = WScript.CreateObject ("WScript.Shell")
txt = inputbox("enter text to be decoded") txt = inputbox ("saisir du texte à décoder")
msgbox encode(txt) encoder msgbox (txt)
x.Run "%windir%\notepad" x.Run "% windir% \ notepad"
wscript.sleep 1000 WScript.Sleep 1000
x.sendkeys encode(txt) function encode(s) encoder x.sendkeys (txt) codent fonction (s)
For i = 1 To Len(s) Pour i = 1 To Len (s)
newtxt = Mid(s, i, 1) newtxt = Mid (s, i, 1)
newtxt = Chr(Asc(newtxt)-3) newtxt = Chr (Asc (newtxt) -3)
coded = coded & newtxt code = code & newtxt
Next Prochain
encode = coded encoder = codé
End Function End Function |
Partager