forked from RfidResearchGroup/ChameleonUltra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: use one process to test many keys for mfkey32v2
It is done by adding a "server" mode (on STDIN/STDOUT) to `mfkey32v2` using `--server`. This improves the speed of the decrypt process, as it prevents a lot of Python calls to `subprocess.Popen()` (and of course, a lot of fork/execve syscalls). On my laptop, with the same logs (37 records for one block and 37 records for another block), here are the performances, as measuerd using a simple command: ```bash time echo -e "hw connect\nhf mf elog --decrypt\nhw disconnect" | ./chameleon_cli_main.py ``` | | | real | user | sys | |---------------------------|---------|------------|------------|-----------| | Before parallelisation | 05ea03d | 14m59,277s | 14m47,995s | 0m8,490s | | With parallelisation | RfidResearchGroup#187 | 6m13,513s | 35m2,926s | 0m22,038s | | With item skipping | RfidResearchGroup#189 | 2m42,491s | 15m43,425s | 0m9,881s | | With `mfkey32v2 --server` | this PR | 1m55,160s | 0m1,315s | 0m0,250s |
- Loading branch information
Showing
3 changed files
with
130 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters