Skip to content

Instantly share code, notes, and snippets.

@vishwarajanand
Created March 9, 2022 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishwarajanand/16e339670d124d7e029bcc7fbec4ac4c to your computer and use it in GitHub Desktop.
Save vishwarajanand/16e339670d124d7e029bcc7fbec4ac4c to your computer and use it in GitHub Desktop.
Crack open your SBI PDF Statements if forgot the registered phone number
# 1: Install pdfplumber from terminal : `pip3 install pdfplumber`
# 2: Save bank statement to a folder as `savings_bank_account_statement.pdf`
# 3: Password is of the format: <last 5 digit of a mobile number><dob>
# 4: Download `SBI-PDF-Statement-cracker.py` file and save to the same folder
# 5: Run this program from terminal as `python3 SBI-PDF-Statement-cracker.py`
import pdfplumber
dob = '131255' # ddmmyy format, dob value is randomized for privacy
for i in range (10000,100000):
pwd = str(i) + dob
try:
with pdfplumber.open(r'savings_bank_account_statement.pdf', password = pwd) as pdf:
first_page = pdf.pages[0]
print(first_page.extract_text())
print(str(pwd) + ' is the password')
break
except:
# print(str(pwd) + ' didnt work')
pass
print("!! Program Running Successfully !!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment