Please consider the following script to replace 'extract-pw.py'.