Codes for Paper: PagPassGPT: Pattern Guided Password Guessing via Generative Pretrained Transformer in DSN 2024.
conda create -n env_name python=3.8.10
conda activate env_name
pip install -r requirements.txt
# pip install numpy==1.24.2 huggingface-hub==0.13.4 fsspec==2022.11.0 torch==2.0.0 transformers==4.29.0 datasets==2.12.0 accelerate==0.17.1
-
You should have a dataset of passwords, like "RockYou" or other datasets. And you should make sure the dataset contains only passwords.
-
Run the script
preprocess.sh
to preprocess datasets.
sh ./scripts/preprocess.sh
Note: Here gives the "RockYou" dataset download link.
Run the script train.sh
to train.
sh ./scripts/train.sh
Run the script generate.sh
to generate.
sh ./scripts/generate.sh
Note: In this shell, you can choose to use D&C-GEN or not by changing just one line.
sh ./scripts/evaluate.sh
Note: The evaluation mainly focus on Hit rate and Repeat rate.
- 2024.12.25: Fix some bugs.
- 2024.12.20: Add pip requirements.
- 2024.12.19: Update all codes.
- Fix some bugs.
- Provide more precise environmental requirements.
- Provide new files for evaluation.
- Make codes more user-friendly.
- Update
README.md
.
- 2024.12.12: Update the paper link (from arXiv to IEEE).
- 2024.4.15: Upload the codes firstly.