Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head><title>Message Encrypter/Decrypter</title><HTA:APPLICATION
- APPLICATIONNAME="Message Encrypter/Decrypter"
- ID="Message Encrypter/Decrypter"
- VERSION="1.0"
- MAXIMIZEBUTTON="yes"
- SCROLL="no"/></head>
- <style> td { color: #7FFF00; }
- caption { color: #7FFF00; }
- body { font-family: Arial; background-color: #535353; color: #7FFF00; }
- input { background-color: #000000; color: #7FFF00; }
- textarea { background-color: #000000; color: #7FFF00; }
- </style>
- <script language="VBScript">
- Sub Window_OnLoad
- Dim width,height
- width=1100
- height=650
- self.ResizeTo width,height
- End Sub
- Function Validate(ID)
- On Error Resume Next
- Key = Int(pass.value)
- If (pass.value = "") Then
- X = MsgBox("Cipher required", 48, "Error")
- Else If (tamsg.value = "") Then
- X = MsgBox("Text required", 48, "ERROR!")
- Else
- Junk = SetTimeOut(KEYS(ID), 1)
- End If
- End If
- End Function
- Function KEYS(ID)
- text = pass.value
- code = 0
- Do Until text = ""
- code = ((Asc(Left(text, 1)))+code)
- text = Replace(text, Left(text, 1), "", "1", "1")
- Loop
- code = code Mod 255
- akey.value = code
- Junk = SetTimeOut(ID, 1)
- End Function
- Function Encrypt
- Alpha = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
- text = tamsg.value
- code = ""
- key = Int(akey.value)
- Do Until text = ""
- cnum = Asc(Left(text, 1))
- cnum = (cnum+key) Mod 255
- num = cnum Mod 26
- count = 0
- tst = num
- Do Until tst = cnum
- tst = tst+26
- count = count+1
- Loop
- code = code & Alpha(num) & count
- text = Replace(text, Left(text, 1), "", "1", "1")
- Loop
- tamsg.value = code
- End Function
- Function Decrypt
- Alpha = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
- text = tamsg.value
- code = ""
- key = Int(akey.value)
- Do Until text = ""
- lttr = Left(text, 2)
- num = Asc(Left(lttr, 1))-65
- chk = Right(lttr, 1)
- count = 0
- Do Until count = Int(chk)
- num = num+26
- count = count+1
- Loop
- num = num-key
- Do While num <= 0
- num = num+255
- Loop
- Code = code & Chr(num)
- text = Replace(text, Left(text, 2), "", "1", "1")
- Loop
- tamsg.value = code
- End Function
- </script>
- <body bgcolor="white"> <input type="hidden" id="akey"> <span title=""> <Enter text to encrypt or decrypt">
- <marquee color="white" bgcolor="black" style="font-family= Book Antiqua;">Enter text to encrypt or decrypt</font></marquee> </span> <table align="center" width="400">
- <caption style="font-family:Book Antiqua; font-size:20;"><hr color="black"><b>Message Encrypter-Decrypter</b><hr color="black"></caption>
- <tr> <td align="center"><span title="Enter your Full message here"><textarea id="tamsg" cols="80" rows="15"></textarea></span></td> </tr>
- <td color="black" style="font-family: Book Antiqua; font-size:18;"><hr color="black"> Cipher: <span title="Enter your cipher here">
- <input type="password" id="pass"></span>
- <span title="Click Here to Encrypt your Message"> <input style="width: 170px; height:35px; color: #7FFF00; background-color: #203040; font-family:Book Antiqua;" type="button" Value="Encrypt" id="btnenc" onClick="Validate('Encrypt')" onmouseover="btnenc.style.background='#102030'" onmouseout="btnenc.style.background='#203040'"> </span> <span title="Click Here to Decrypt your Message"> <input style="width: 170px; height:35px; color: #7FFF00; background-color: #203040; font-family: Book Antiqua; font-size:18;" type="button" Value="Decrypt" id="btndec" onClick="Validate('Decrypt')" onmouseover="btndec.style.background='#102030'" onmouseout="btndec.style.background='#203040'"> </span></td>
- </tr> <tr> <td align="right"><hr color="black"><span title="All rights reserved by succ" style="font-size: 13px; font-family:Book Antiqua;">© succ.</span></td> </tr> </table> </body> </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement