Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crmne/fprintclear
List or delete enrolled fingerprints on fingerprint readers with fprint
https://github.com/crmne/fprintclear
Last synced: 6 days ago
JSON representation
List or delete enrolled fingerprints on fingerprint readers with fprint
- Host: GitHub
- URL: https://github.com/crmne/fprintclear
- Owner: crmne
- Created: 2024-06-04T08:44:17.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T09:07:10.000Z (7 months ago)
- Last Synced: 2024-11-08T19:45:59.635Z (about 2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fprintclear
This script interacts with fingerprint readers to list or delete enrolled fingerprints. It leverages the FPrint library and requires root privileges to access the devices.
## Installation
First, install the necessary system-level dependencies.
### Fedora
```sh
sudo dnf install gobject-introspection-devel cairo-gobject-devel
```### Python dependencies
After installing the system-level dependencies, use Poetry to install the Python dependencies.
```sh
poetry install
```## Usage
To use the script, activate the Poetry shell and run the script with root privileges.
```sh
poetry shell
sudo $(which python) fprintclear.py
```### Options
- `-d` or `--delete`: Deletes enrolled fingerprints.
Example:
```sh
sudo $(which python) fprintclear.py -d
```## Script Explanation
This script is designed to interact with fingerprint readers using the FPrint library. Fingerprint readers store images of your fingerprints, usually at a resolution of 256x288 pixels. These images are taken from various angles to ensure reliable matching. Each enrolled fingerprint takes up around 750kB of storage, with the device typically having around 11MB of total storage capacity.
The script performs the following tasks:
1. **Check for Root Privileges:** Ensures the script is run with root privileges.
2. **Initialize FPrint Context:** Sets up the context for interacting with fingerprint devices.
3. **List Fingerprint Devices:** Enumerates connected fingerprint devices.
4. **List Enrolled Fingerprints:** For each device, lists the fingerprints currently enrolled.
5. **Delete Fingerprints (optional):** If the `-d` flag is set, deletes the enrolled fingerprints.### Detailed Workflow
1. **Root Privilege Check:**
- The script checks if it's run with root privileges using `geteuid()`.
- If not, it prompts the user to rerun the script with `sudo`.2. **Context Initialization:**
- The FPrint context is initialized to interact with the fingerprint devices.3. **Device Enumeration:**
- The script loops through each connected fingerprint device and prints device information such as the driver and device ID.4. **Enrolled Fingerprints:**
- For each device, the script lists the enrolled fingerprints, printing information such as the enrollment date, finger, username, and description.5. **Fingerprint Deletion:**
- If the `-d` flag is specified, the script deletes the enrolled fingerprints from the device.