https://github.com/davphla/kernel-otp
Linux Kernel OTP (One Time Password) module
https://github.com/davphla/kernel-otp
device kernel linux module vagrant
Last synced: 9 months ago
JSON representation
Linux Kernel OTP (One Time Password) module
- Host: GitHub
- URL: https://github.com/davphla/kernel-otp
- Owner: Davphla
- Created: 2024-12-13T14:21:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-13T16:10:23.000Z (over 1 year ago)
- Last Synced: 2025-10-06T14:48:46.839Z (9 months ago)
- Topics: device, kernel, linux, module, vagrant
- Language: C
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kernel OTP
## Créer et intéragir avec la vm :
`vagrant up`
`vagrant ssh`
`sudo su -`
## Build et activer le module otp :
`cd /otp_module`
`make`
`insmod otp.ko [num_passwords=n] [otp_key="key"] [otp_validity_duration=seconds]`
## Désactiver et nettoyer le module otp :
`cd /otp_module`
`make clean`
`rmmod otp`
## Build l'utilitaire :
`cd /otp_utilitaire`
`make`
## Nettoyer l'utilitaire :
`cd /otp_utilitaire`
`make fclean`
## Utiliser le module otp
### Afficher le dictionaire de mot de passe :
`cat /dev/otp_list`
### Afficher le code TOTP actuel :
`cat /dev/otp_totp`
### Modifiere les paramamètres :
`echo 5 | tee /sys/module/otp/parameters/otp_validity_duration`
(it is not possible to change the parameter num_passords after the module is loaded)
### Afficher les paramètres :
`cat /sys/module/otp/parameters/num_passwords`
## Utiliser l'utilitaire :
```
Usage: utilitaire
Options:
--add-password Add a password to the list
--set-totp-key Set the TOTP key\
--set-totp-interval Set the TOTP interval (in seconds)
--verify-password Verify a password from the list
--verify-totp Verify a TOTP code
--help Show this message
```