123456789101112131415161718192021222324252627282930 |
- import codecs
- import sys
- def crack_access_mdb(file):
- no_pass_62 = "0C"
- no_pass_42 = "BE68EC3765D79CFAFECD28E62B258A606C077B36CDE1DFB14F671343F73C"
- with open(file, "rb") as f:
- f.seek(66, 0) # x42 == 66
- myfile_42 = f.read(30)
- f.seek(98) # x62 == 98
- myfile_62 = f.read(1)
- salt = ord(codecs.decode(no_pass_62, "hex")) ^ ord(myfile_62)
- add_salt = True
- word = ""
- for i in range(0, 52, 4):
- xored = ord(codecs.decode(no_pass_42[i : i + 2], "hex")) ^ myfile_42[i // 2]
- if add_salt:
- xored = xored ^ salt
- word = word + chr(xored)
- add_salt = not add_salt
- print(word)
- if __name__ == "__main__":
- file = sys.argv[1]
- crack_access_mdb(file)
|