Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Made by u/Maxxer500, aka C0deR0gue
- 'Made because the original code from u/kajvanschalk was difficult to read and needed multiple fixes
- 'Sets up the cleartext variable to be used by the cipher function
- cleartext=inputbox("Text to be converted" , "2-way Cipher")
- 'Reverses the cleartext
- cleartext=StrReverse(cleartext)
- 'Makes the cleartext lowercase, without this uppercase characters would break the code
- cleartext=lcase(cleartext)
- 'cipher function, which does a simple conversion to all text (a=z, b=y, c=x, and so on). You can change the variables, as long as they stay consistent
- Function cipher(input)
- 'Gets the input text and makes it a function variable
- wip=input
- 'This block converts the first 13 alphabet characters into temporary numerical characters, without this we would encrypt and then immediately decrypt half the alphabet every time. I don't reccommend changing anything here
- wip=Replace(wip , "a" , "1")
- wip=Replace(wip , "b" , "2")
- wip=Replace(wip , "c" , "3")
- wip=Replace(wip , "d" , "4")
- wip=Replace(wip , "e" , "5")
- wip=Replace(wip , "f" , "6")
- wip=Replace(wip , "g" , "7")
- wip=Replace(wip , "h" , "8")
- wip=Replace(wip , "i" , "9")
- wip=Replace(wip , "j" , "0")
- wip=Replace(wip , "k" , "!")
- wip=Replace(wip , "l" , "@")
- wip=Replace(wip , "m" , "#")
- 'This block converts the second 13 alphabet characters into their final corresponding text. You can change the 3rd argument to whatever you want the output to be.
- wip=Replace(wip , "n" , "m")
- wip=Replace(wip , "o" , "l")
- wip=Replace(wip , "p" , "k")
- wip=Replace(wip , "q" , "j")
- wip=Replace(wip , "r" , "i")
- wip=Replace(wip , "s" , "h")
- wip=Replace(wip , "t" , "g")
- wip=Replace(wip , "u" , "f")
- wip=Replace(wip , "v" , "e")
- wip=Replace(wip , "w" , "d")
- wip=Replace(wip , "x" , "c")
- wip=Replace(wip , "y" , "b")
- wip=Replace(wip , "z" , "a")
- 'This block converts the temporary numerical characters into their final corresponding text. You can change the 3rd argument to whatever you want the output to be.
- wip=Replace(wip , "1" , "z")
- wip=Replace(wip , "2" , "y")
- wip=Replace(wip , "3" , "x")
- wip=Replace(wip , "4" , "w")
- wip=Replace(wip , "5" , "v")
- wip=Replace(wip , "6" , "u")
- wip=Replace(wip , "7" , "t")
- wip=Replace(wip , "8" , "s")
- wip=Replace(wip , "9" , "r")
- wip=Replace(wip , "0" , "q")
- wip=Replace(wip , "!" , "p")
- wip=Replace(wip , "@" , "o")
- wip=Replace(wip , "#" , "n")
- 'Sets the output of the function properly. VBScript likes to break without this line
- cipher=wip
- End Function
- 'Takes our cleartext and converts it using the cipher function, then displays the output in a simple messagebox
- ciphertext=cipher(cleartext)
- dummy=msgbox(ciphertext ,0, "2-way Cipher")
Advertisement
Add Comment
Please, Sign In to add comment