How to do it…

In the following steps, we will train PassGAN on a corpus of leaked passwords and then use it to generate new password guesses. Let's get started:

  1. Train your neural network on the dataset by running the following command:
python train.py --output-dir output --training-data data/train.txt
  1. Generate a list of (100,000) password guesses by running the following command:
python sample.py \--input-dir pretrained \--checkpoint pretrained/checkpoints/195000.ckpt \--output gen_passwords.txt \--batch-size 1024 \--num-samples 100000

Your Terminal should look something like the following:

Get Machine Learning for Cybersecurity Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.