Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pdf): use JtR to automatically unlock PDFs #7

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

benjamin-awd
Copy link
Owner

@benjamin-awd benjamin-awd commented Sep 20, 2023

Some banks like Citibank, or OCBC (if I'm not mistaken) provide a single
consolidated bank statement each month, which means we only need to define
and pass a single password for these banks.

Other banks like HSBC provide a bank statement per credit card, which
requires defining several passwords for different credit cards.

I've opted to use JtR (or john) to automatically unlock (aka brute force)
PDFs with a common prefix. For example, HSBC PDFs all begin with
a DOB format (e.g. 21Feb1992), and end with the last six digits of the card

Using john, we can use pass in a mask like ?d?d?d?d?d?d, and avoid
having to define multiple passwords for a single bank.

On the downside, this means that the code executes slightly slower.

This PR is a stepping stone to only use one or two environment variables i.e.
a DOB like YYYY-MM-DD or personal identification number (e.g. NRIC), instead
of having to define a specific password for every bank.

@benjamin-awd benjamin-awd force-pushed the brute-force branch 7 times, most recently from 3c9a923 to 9c1a5aa Compare October 3, 2023 15:52
Some banks like Citibank, or OCBC (if I'm not mistaken) provide a single
consolidated bank statement each month, which means we only need to define
and pass a single password for these banks.

Other banks like HSBC provide a bank statement per credit card, which
requires defining several passwords for different credit cards.

I've opted to use JtR (or `john`) to automatically unlock (aka brute force)
PDFs with a common prefix. For example, HSBC PDFs all begin with
a DOB format (e.g. 21Feb1992), and end with the last six digits of the card

Using john, we can use pass in a mask like `?d?d?d?d?d?d`, and avoid
having to specify the card number within two separate passwords.

On the downside, this means that the code executes slightly slower.

This PR is a stepping stone to only use one or two environment variables i.e.
a DOB like YYYY-MM-DD or personal identification number (e.g. NRIC), instead
of having to define a specific password for every bank.
@benjamin-awd benjamin-awd merged commit b55f4f8 into main Oct 4, 2023
2 checks passed
@benjamin-awd benjamin-awd deleted the brute-force branch October 6, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant