MOD: updated ver num, code cleanup
This commit is contained in:
parent
eaf415e7f0
commit
a141b51529
|
@ -36,7 +36,7 @@ class FingerprintDB:
|
||||||
|
|
||||||
sqlmaster = "SELECT name, sql FROM sqlite_master WHERE type='table'"
|
sqlmaster = "SELECT name, sql FROM sqlite_master WHERE type='table'"
|
||||||
# version of the scanner used to create the fingerprint
|
# version of the scanner used to create the fingerprint
|
||||||
scanner_ver = "0.98"
|
scanner_ver = "1.00b"
|
||||||
# version of the json file format, this # is inserted in the json fingerprint file and can be used to determine what is supported at the time of that version
|
# version of the json file format, this # is inserted in the json fingerprint file and can be used to determine what is supported at the time of that version
|
||||||
format_ver = "0.92"
|
format_ver = "0.92"
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,6 @@ class FingerprintIndex:
|
||||||
#
|
#
|
||||||
def __insertMod_md5_all(self, md5_db, md5_list, filename):
|
def __insertMod_md5_all(self, md5_db, md5_list, filename):
|
||||||
try:
|
try:
|
||||||
#logging.info("INSERT INTO md5_all VALUES({}, {}, {}, 1)".format(md5_db, ','.join(md5_list), filename))
|
|
||||||
self.db_conn.execute(
|
self.db_conn.execute(
|
||||||
'''
|
'''
|
||||||
INSERT INTO md5_all VALUES(?, ?, ?, ?)
|
INSERT INTO md5_all VALUES(?, ?, ?, ?)
|
||||||
|
@ -234,7 +233,6 @@ class FingerprintIndex:
|
||||||
(fp_list, fp_count) = self.__selectFileList(md5_db)
|
(fp_list, fp_count) = self.__selectFileList(md5_db)
|
||||||
fp_list += ","+filename
|
fp_list += ","+filename
|
||||||
fp_count += 1
|
fp_count += 1
|
||||||
#logging.info("fp_list=={}".format(fp_list))
|
|
||||||
self.db_conn.execute(
|
self.db_conn.execute(
|
||||||
'''
|
'''
|
||||||
UPDATE md5_all SET fp_list=?, fp_count=? WHERE md5_db=?
|
UPDATE md5_all SET fp_list=?, fp_count=? WHERE md5_db=?
|
||||||
|
@ -269,17 +267,11 @@ class FingerprintIndex:
|
||||||
|
|
||||||
#
|
#
|
||||||
def __insertMod_metadata(self, db, filename):
|
def __insertMod_metadata(self, db, filename):
|
||||||
# insert the md5 of the table schemas
|
|
||||||
# print "*****"
|
|
||||||
# print "***** {}".format(db.metadata)
|
|
||||||
# print "***** {}".format(db.metadata['fart'])
|
|
||||||
# print "***** {}".format(db.metadata['app_name'])
|
|
||||||
try:
|
try:
|
||||||
self.db_conn.execute(
|
self.db_conn.execute(
|
||||||
'''
|
'''
|
||||||
INSERT INTO metadata VALUES(?, ?, ?, ?, ?, ?)
|
INSERT INTO metadata VALUES(?, ?, ?, ?, ?, ?)
|
||||||
''', [db.db_hash, db.metadata['app-name'], db.metadata['app-ver'], db.metadata['db-name'], filename, db.metadata['scan-date']])
|
''', [db.db_hash, db.metadata['app-name'], db.metadata['app-ver'], db.metadata['db-name'], filename, db.metadata['scan-date']])
|
||||||
# ''', ["abc", "efg", "hij", "klm", "nop", "qrs"])
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print ex
|
print ex
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue