Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Win32API Mouse vs Real Mouse Click

Tags:

python

winapi

I have recently started using win32api to simulate mouse events and was wondering if it was at all detectable?

For example, does the api follow the exact same process/run the exact same commands as if done when using a real mouse - or are there some slight differences which can be detected? Furthermore, is this the same case with win32com SendKeys (via Shell Script/Python)?

I ask, because in the past I have had a few applications detect the Java robot library - but they all seem to work fine when using the Python win32api. Thanks.

like image 663
Exam Orph Avatar asked Jul 05 '17 14:07

Exam Orph


1 Answers

The SendInput function will insert input events into the same queue as a hardware device but the events are marked with a LLMHF_INJECTED flag that can be detected by hooks. To avoid this flag you probably have to write a custom driver.

like image 106
Anders Avatar answered Oct 19 '22 14:10

Anders