Page 1 of 1

Simple Anti Olly & ...

Posted: Thu May 28, 2009 6:51 am
by hipy001
Simple Anti Olly & ...
i New for "PureBasic" so maybe not correct "code" but ... :)

Code: Select all

Enumeration
  #FormMain
EndEnumeration

Procedure Anti_Olly()
  GetCursorPos_(@hCur)
  hWin = WindowFromPoint_(PeekQ(@hCur))
  class.s = Space(128)
  GetClassName_(hWin, @class, 128)
  If class = "ACPUASM" ;Or Other wClass
    AnimateWindow_(hWin, 250, #AW_BLEND | #AW_HIDE)
  EndIf
EndProcedure

Procedure FormMain()
  OpenWindow(#FormMain, 343, 656, 311, 30, "Simple Anti Olly .... :)", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar)
  TextGadget(0, 65, 5, 160, 20, "Fun Anti Olly .... :)")
  Repeat
    EventID = WaitWindowEvent()
    timer = SetTimer_(WindowID(#FormMain), 1, 300, Anti_Olly())
    EventGadget = EventGadget()
  Until EventID = #PB_Event_CloseWindow
  If timer
    KillTimer_(WindowID(#FormMain), 1)
  EndIf
EndProcedure
FormMain()

sorry for my BAD English
:(

Posted: Thu May 28, 2009 7:49 am
by Kukulkan
Hi hipy001,

Thank you, but do I understand you correct that this should prevent the usage of Olly Debug on a program?

It seems that you create an endless amount of timers using SetTimer_() API function. As each of those functions will be called in intervall of 300 milliseconds, this will float the system with endless timers bringing the system to overload. Or am I wrong?

It may be enough to call the SetTimer_() API function once on program startup.

What, if the 'cracker' starts the program using OllyDebug and prevents the call of SetTimer_() on startup? I think this is not really a working trick against debugging using Olly-Debug...

Kukulkan