Sinisterly
Encryption + Decryption program - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Encryption + Decryption program (/Thread-Encryption-Decryption-program)



Encryption + Decryption program - ben - 10-01-2017

vbs encryption and decryption script


Date: 2017-10-01:
Time: 22:41:16

encrypt :
set x = WScript.CreateObject("WScript.Shell")
mySecret = inputbox("enter text to be encoded")
'Reverse the submitted text'
mySecret = StrReverse(mySecret)
'Open up an instance of Notepad to print the results after waiting for 1 second'
x.Run "%windir%\notepad"
wscript.sleep 1000
x.sendkeys encode(mySecret)'this function encodes the text by advancing each character 3 letters'
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)+3)
coded = coded & newtxt
Next
encode = coded
End Function

decrypt:
set x = WScript.CreateObject("WScript.Shell")
mySecret = inputbox("Enter text to be decoded")
'Reverse the submitted text'
mySecret = StrReverse(mySecret)
'Open up an instance of Notepad to print the results after waiting for 1 second
x.Run "%windir%\notepad"
wscript.sleep 1000
x.sendkeys encode(mySecret)
'this function encodes the text by advancing each character 3 letters
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)-3)
coded = coded & newtxt
Next
encode = coded
End Function



RE: Encryption + Decryption program - wizzzarden - 01-05-2018

How to input same code into VBS scrupt wits come text of my programm?