fabriciorissetto / keystrokeapi Goto Github PK
View Code? Open in Web Editor NEW:lock: A simple Keylogger API written in C# that works for any Windows OS version
License: Do What The F*ck You Want To Public License
:lock: A simple Keylogger API written in C# that works for any Windows OS version
License: Do What The F*ck You Want To Public License
Error: "Additional information: A callback was made on a garbage collected delegate of type 'KeystrokeAPI!Keystroke.API.User32+LowLevelHook::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called."
This error occurs to me if the program performs multiple operations
As title says, you have wrong condition in the Dispose
method of the KeystrokeAPI
class.
It is supposed to be
if (globalKeyboardHookId != IntPtr.Zero)
User32.UnhookWindowsHookEx(globalKeyboardHookId);
instead of
if (globalKeyboardHookId == IntPtr.Zero)
User32.UnhookWindowsHookEx(globalKeyboardHookId);
Also the overall design of the class is quite easy to create handle leaks - e.g. call twice CreateKeyboardHook
and you are no longer able to unhook the hook.
There is a issue in this library in capturing keystrokes like entering the username and password in a Windows Modal/Popup Box of User Account Control.
Any workarounds for that ?
When running a program that uses your KeystrokeAPI but also when using the test app, at some point, mostly when the RAM consumption grew by approx. 3MB, the app throws a System.AccessViolationException. I can reproduce this Exception pretty easily by holding down backspace key on either machine i tried. Unfortunately there's no stack trace showing up. So can you figure out what might cause that Exception? Thanks!
Edit: To be more precise: It always happens after 720 pressed keys regardless of the exact key.
I geting random error
Managed Debugging Assistant 'CallbackOnCollectedDelegate' has detected a problem in 'D:\Programming\KeyLogger\KL\KL\bin\Debug\KL.vshost.exe'.
Additional information: A callback was made on a garbage collected delegate of type 'KeystrokeAPI!Keystroke.API.User32+LowLevelHook::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.
To reproduce need to open any Windows Explorer window and try to press any keys few times.
Alt,
Ctrl
Fn
WinBtn
this API is great and worked like a charm but I am facing one issue once createkeyboardhook is called this hook is then permanent cannot cancel that hook by calling dispose function or by nulling the api object . . it is requested to provide a built in unhook method
Greetings!
thanks to develop this api but i have an issue on using it. when i run using win form application it gives call back error and my application stops running. Details as follows..
A call back was made on garbage collected delegate of type "keystroke-api"..
plz resolve this issue
thanks
code attached
Code4github.txt
Why it only reads English characters?!
bool isLogging = true;
while (isLogging)
{
if (!offlineKeyLogging)
{
isLogging= false;
try
{
Application.DoEvents();
keyAPIOf.Dispose();
GC.Collect();
GC.EndNoGCRegion();
}
catch (Exception ex)
{
Application.DoEvents();
}
}
Application.DoEvents();
}
Hello, what is the license for the lib? I would be interested in using it in a project, which will be sold.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.