https://github.com/tsoding/voidf
V̳͙̥̹̟͗̀̎̓͌͐́O̘̞͇̞̣͇͕͂͠I͙̋͐̍͂̀D̶͕̩̦̲͙F̟̖̮ͩ̏ͥ̂ͨ͠ ͍̰̫̯͙̯ͨ̉ͤ̈̿ͭI̤͍̲̯ͤ̎̀͝S̴̻͇̳̗̩ͧ̆ ̭̘̦ͭ͒Ĉ̸̰̼̤̖̲O̹̭̞̺̻͚̣̒M̪͓̗̤͋͢Ĩ͔̗̣̻̄̏̏̏̚N̳̦̂ͯ̅͂̓̈́G͈̣
https://github.com/tsoding/voidf
Last synced: 2 months ago
JSON representation
V̳͙̥̹̟͗̀̎̓͌͐́O̘̞͇̞̣͇͕͂͠I͙̋͐̍͂̀D̶͕̩̦̲͙F̟̖̮ͩ̏ͥ̂ͨ͠ ͍̰̫̯͙̯ͨ̉ͤ̈̿ͭI̤͍̲̯ͤ̎̀͝S̴̻͇̳̗̩ͧ̆ ̭̘̦ͭ͒Ĉ̸̰̼̤̖̲O̹̭̞̺̻͚̣̒M̪͓̗̤͋͢Ĩ͔̗̣̻̄̏̏̏̚N̳̦̂ͯ̅͂̓̈́G͈̣
- Host: GitHub
- URL: https://github.com/tsoding/voidf
- Owner: tsoding
- License: mit
- Created: 2020-12-04T12:17:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-03T19:17:44.000Z (over 4 years ago)
- Last Synced: 2025-04-29T12:29:14.583Z (8 months ago)
- Language: C
- Homepage:
- Size: 203 KB
- Stars: 37
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# voidf
## Quick Start
```console
$ make
$ ./voidf
```
## setuid/setgid support
The application supports temporary privilege escalation via setuid/setgid bits. It uses the privilege only to scan `/dev/input/*` folder and open the selected input device. After that it lowers its privilege down to its real uid/gid and continues to function like a regular user application.
### setuid example
```
# cp voidf /usr/local/bin
# chown root:root /usr/local/bin/voidf
# chmod 4755 /usr/local/bin/voidf
```
### setgid example on Debian
On my Debian Stale 10 I have a group called `input` that has the access to `/dev/input/*` files. So this is what I do on my machine:
```
# cp voidf /usr/local/bin
# chown root:input /usr/local/bin/voidf
# chmod g+s /usr/local/bin/voidf
```
This way voidf is never ran with root privileges. It is only ran with temporary `input` group privilege just to open the input device file.
## Controls
To increment the counter you have to type the sequence of characters `voidf`. Focus on the main window is not required.
The following actions do require the window focus tho:
| Shortcut | Description |
| --- | --- |
| F5 | Reset the counter |
| Ctrl + Z | Undo the counter reset |
## References
- https://github.com/freedesktop-unofficial-mirror/evtest/blob/b8343ec1124da18bdabcc04809a8731b9e39295d/evtest.c
- https://www.gnu.org/software/libc/manual/html_node/Setuid-Program-Example.html