Skip to content

Minimalist Python library using wraps of undocumented `Nt` functions to interact with mouse and keyboard stealthy

Notifications You must be signed in to change notification settings

Xenely14/ntnput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ntnput

The Minimalistic Python library for Windows using wraps of undocumented Nt functions to interact with mouse and keyboard stealthy.

Details

This library uses syscall wraps of undocumented NtUserInjectMouseInput and NtUserInjectKeyboardInput functions from win32u.dll module. It's makes keyboard and mouse interaction safe and stealth due to the bypass of Windows triggers.

NtNput also works faster than analogues because of usage of builtin ctypes library allowing to interact directly with C and machine code. You can use this library if your process blocks usage of mouse_event, SendInput or etc. WinAPI functions.

Installation

  1. You can install library using pip:
pip install ntnput
  1. You can download this repo, put it's folder into your project and import it using the folder name:

Local installation example

Usage

Library provides several functions to interact with mouse:

  1. mouse_move(x, y) - moves mouse from current position
  2. mouse_move_to(x, y) - moves mouse to absolute x, y position
  3. mouse_click(button <default "left">) - clicks mouse
  4. mouse_release(button <default "left">) - releases mouse
  5. mouse_click_and_release(button <default "left">, delay_ms <default 0.0>) - clicks mouse, sleeps, releases

And several functions to interact with keyboard:

  1. keyboard_press(key_code) - presses keyboard button
  2. keyboard_release(key_code) - releases keyboard button
  3. keyboard_press_and_release(key_code, delay_ms <default 0.0>) - presses keyboard button, sleeps, releases

You can use official Microsoft documentation to find keyboard key codes definitions.

About

Minimalist Python library using wraps of undocumented `Nt` functions to interact with mouse and keyboard stealthy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages