mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-05-17 14:09:30 +08:00
last commit failed
This commit is contained in:
parent
1e389d8d4c
commit
418d57bc0c
@ -32,6 +32,20 @@ MdbHandle *mdb;
|
|||||||
fprintf(stderr,"Couldn't open file %s\n",filename);
|
fprintf(stderr,"Couldn't open file %s\n",filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (!mdb_read_pg(mdb, 0)) {
|
||||||
|
fprintf(stderr,"Couldn't read first page.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
mdb->jet_version = mdb_get_int32(mdb, 0x14);
|
||||||
|
if (mdb->jet_version == MDB_VER_JET4) {
|
||||||
|
mdb->pg_size = 4096;
|
||||||
|
} else {
|
||||||
|
mdb->pg_size = 2048;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get the db encryption key and xor it back to clear text */
|
||||||
|
mdb->db_key = mdb_get_int32(mdb, 0x3e);
|
||||||
|
mdb->db_key ^= 0xe15e01b9;
|
||||||
|
|
||||||
return mdb;
|
return mdb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user