how to build a PSM based on this program
password_scorer.py provides probability to each psw, but monte carlo needs to randomly sample, which is not provided.
There actually is a random sample if you generate honeywords/random_walk. For example:
python3 pcfg_guesser.py -m random_walk
There isn't currently any difference between random_walk and honeywords but eventually I'd like to add some target specific logic to honeywords so random_walk is likely closer to what you are looking for to feed into monte carlo calculations. As a side note, the probability value of a password is known by the generator before it is outputted, so a slight modification of the code would allow outputting that vs. the psw so you don't need to re-run the results through the scorer to get that probability score.
There actually is a random sample if you generate honeywords/random_walk. For example:
python3 pcfg_guesser.py -m random_walk
There isn't currently any difference between random_walk and honeywords but eventually I'd like to add some target specific logic to honeywords so random_walk is likely closer to what you are looking for to feed into monte carlo calculations. As a side note, the probability value of a password is known by the generator before it is outputted, so a slight modification of the code would allow outputting that vs. the psw so you don't need to re-run the results through the scorer to get that probability score.
Thansk for your reply. I tried your solution, but found this error:
pcfg_guesser.py: error: unrecognized arguments: -m random_walk
I find that my code version is 4.1 and this is new application in 4.3. Problem solved