Advertisement
Guest User

Untitled

a guest
Apr 16th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. <html><head><title>Message Encrypter/Decrypter</title><HTA:APPLICATION
  2. APPLICATIONNAME="Message Encrypter/Decrypter"
  3. ID="Message Encrypter/Decrypter"
  4. VERSION="1.0"
  5. MAXIMIZEBUTTON="yes"
  6. SCROLL="no"/></head>
  7. <style> td { color: #7FFF00; }
  8. caption { color: #7FFF00; }
  9. body { font-family: Arial; background-color: #535353; color: #7FFF00; }
  10. input { background-color: #000000; color: #7FFF00; }
  11. textarea { background-color: #000000; color: #7FFF00; }
  12. </style>
  13. <script language="VBScript">
  14. Sub Window_OnLoad
  15. Dim width,height
  16. width=1100
  17. height=650
  18. self.ResizeTo width,height
  19. End Sub
  20. Function Validate(ID)
  21. On Error Resume Next
  22. Key = Int(pass.value)
  23. If (pass.value = "") Then
  24. X = MsgBox("Cipher required", 48, "Error")
  25. Else If (tamsg.value = "") Then
  26. X = MsgBox("Text required", 48, "ERROR!")
  27. Else
  28. Junk = SetTimeOut(KEYS(ID), 1)
  29. End If
  30. End If
  31. End Function
  32. Function KEYS(ID)
  33. text = pass.value
  34. code = 0
  35. Do Until text = ""
  36. code = ((Asc(Left(text, 1)))+code)
  37. text = Replace(text, Left(text, 1), "", "1", "1")
  38. Loop
  39. code = code Mod 255
  40. akey.value = code
  41. Junk = SetTimeOut(ID, 1)
  42. End Function
  43. Function Encrypt
  44. 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")
  45. text = tamsg.value
  46. code = ""
  47. key = Int(akey.value)
  48. Do Until text = ""
  49. cnum = Asc(Left(text, 1))
  50. cnum = (cnum+key) Mod 255
  51. num = cnum Mod 26
  52. count = 0
  53. tst = num
  54. Do Until tst = cnum
  55. tst = tst+26
  56. count = count+1
  57. Loop
  58. code = code & Alpha(num) & count
  59. text = Replace(text, Left(text, 1), "", "1", "1")
  60. Loop
  61. tamsg.value = code
  62. End Function
  63. Function Decrypt
  64. 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")
  65. text = tamsg.value
  66. code = ""
  67. key = Int(akey.value)
  68. Do Until text = ""
  69. lttr = Left(text, 2)
  70. num = Asc(Left(lttr, 1))-65
  71. chk = Right(lttr, 1)
  72. count = 0
  73. Do Until count = Int(chk)
  74. num = num+26
  75. count = count+1
  76. Loop
  77. num = num-key
  78. Do While num <= 0
  79. num = num+255
  80. Loop
  81. Code = code & Chr(num)
  82. text = Replace(text, Left(text, 2), "", "1", "1")
  83. Loop
  84. tamsg.value = code
  85. End Function
  86. </script>
  87. <body bgcolor="white"> <input type="hidden" id="akey"> <span title=""> <Enter text to encrypt or decrypt">
  88. <marquee color="white" bgcolor="black" style="font-family= Book Antiqua;">Enter text to encrypt or decrypt</font></marquee> </span> <table align="center" width="400">
  89. <caption style="font-family:Book Antiqua; font-size:20;"><hr color="black"><b>Message Encrypter-Decrypter</b><hr color="black"></caption>
  90. <tr> <td align="center"><span title="Enter your Full message here"><textarea id="tamsg" cols="80" rows="15"></textarea></span></td> </tr>
  91. &nbsp;&nbsp;&nbsp;&nbsp; <td color="black" style="font-family: Book Antiqua; font-size:18;"><hr color="black"> Cipher: &nbsp;<span title="Enter your cipher here">
  92. <input type="password" id="pass"></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  93. <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>
  94. </tr> <tr> <td align="right"><hr color="black"><span title="All rights reserved by succ" style="font-size: 13px; font-family:Book Antiqua;">&copy; succ.</span></td> </tr> </table> </body> </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement