From 558c19ccb83f1526df6fdbad92de085bce3670bb Mon Sep 17 00:00:00 2001 From: JohnE Date: Tue, 9 Feb 2016 16:36:23 -0800 Subject: [PATCH] WIP: table md5 search --- docs/devnotes | 1 - libs/fingerprint_index.py | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/devnotes b/docs/devnotes index 11f20d5..4d0cb64 100644 --- a/docs/devnotes +++ b/docs/devnotes @@ -6,7 +6,6 @@ Action Items from the code review: -Create a document describing the index file and include an example -Add a table to the Index to list all the applications that have a fingerprint (include the app version) - -more functionality can result from this information in the index -Create an example of the FingerprintDB class usage with a standalone tool diff --git a/libs/fingerprint_index.py b/libs/fingerprint_index.py index dd60e1c..c145ddc 100644 --- a/libs/fingerprint_index.py +++ b/libs/fingerprint_index.py @@ -54,7 +54,6 @@ class FingerprintIndex: # def findFP(self, md5_db, md5_tables): - #print "***** findFP *****\nmd5_db=={} md5_tables=={}\n".format(md5_db, md5_tables) rows = self.__qDatabaseMD5(md5_db) # rowcount will be -1 if nothing was returned if rows.rowcount > 0: @@ -72,6 +71,14 @@ class FingerprintIndex: #print "***** __qTableMD5 *****\n{}\n".format(retval.keys()) return retval.keys() + # + def findTable(self, md5_db): + rows = self.__qDatabaseMD5(md5_db) + # rowcount will be -1 if nothing was returned + if rows.rowcount > 0: + #print "***** __qDatabaseMD5 *****\n{}\n".format(rows) + return rows + # def __qDatabaseMD5(self, md5_db): try: