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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.