vbs0cmd
-
Total Posts
:
15
- Scores: 0
-
Reward points
:
0
- Joined: 8/8/2009
-
Status: offline
|
encrypt.vbs / decrypt.vbs
Saturday, August 08, 2009 11:16 AM
( permalink)
'encrypt.vbs set x = createobject("wscript.shell") txt = inputbox("enter text to be encoded:") msgbox(encode(""&(txt))) x.run "notepad" wscript.sleep "1000" x.sendkeys(encode(""&(txt))) 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.vbs set x = createobject("wscript.shell") txt = inputbox("enter text to be decoded:") msgbox(encode(""&(txt))) x.run "notepad" wscript.sleep "1000" x.sendkeys(encode(""&(txt))) 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
|
|
|
|
TomRiddle
-
Total Posts
:
620
- Scores: 12
-
Reward points
:
0
- Joined: 2/7/2008
- Location: Australia
-
Status: offline
|
Re: encrypt.vbs / decrypt.vbs
Friday, March 12, 2010 9:32 PM
( permalink)
I had a look at this because I am making a collection of codes and ciphers written in vbscript, I am baffled at why I had to change nearly every line to make it work. BTW it is "Caesar Cipher" 'encrypt.vbs
set x = WScript.CreateObject("WScript.Shell")
txt = inputbox("enter text to be encoded")
msgbox encode(txt)
x.Run "%windir%\notepad"
wscript.sleep 1000
x.sendkeys encode(txt)
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.vbs
set x = WScript.createobject("wscript.shell")
txt = inputbox("enter text to be decoded")
msgbox encode(txt)
x.Run "%windir%\notepad"
wscript.sleep 1000
x.sendkeys encode(txt) 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
-join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
|
|
|
|
watchmen626
-
Total Posts
:
4
- Scores: 0
-
Reward points
:
0
- Joined: 4/3/2010
-
Status: offline
|
Re: encrypt.vbs / decrypt.vbs
Saturday, April 03, 2010 12:14 PM
( permalink)
hey this is pretty awesome i like this how long did it take you to figure this out
i am an emoskaterspartanjediassassininjavampirezombieinspace in other words im a nerdy cool kid haha
|
|
|
|
TomRiddle
-
Total Posts
:
620
- Scores: 12
-
Reward points
:
0
- Joined: 2/7/2008
- Location: Australia
-
Status: offline
|
Re: encrypt.vbs / decrypt.vbs
Monday, April 05, 2010 11:59 AM
( permalink)
About 10 mins to turn the code in to something that runs you mean? It would take under an hour to write it from scratch and i would have done it differently.
-join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
|
|
|
|