WIP
This commit is contained in:
parent
c0e220a599
commit
7bb2a6c2a5
|
@ -1,9 +1,8 @@
|
||||||
from gi.repository import GExiv2
|
from gi.repository import GExiv2
|
||||||
|
|
||||||
exif = GExiv2.Metadata('space.jpg')
|
exif = GExiv2.Metadata("space.jpg")
|
||||||
|
|
||||||
print("*** *** *** *** *** *** ***")
|
print("*** *** *** *** *** *** ***")
|
||||||
print(exif)
|
|
||||||
print(exif.get_date_time())
|
print(exif.get_date_time())
|
||||||
print ("*** *** *** *** *** *** ***")
|
print ("*** *** *** *** *** *** ***")
|
||||||
|
|
||||||
|
|
66
picseal.py
66
picseal.py
|
@ -1,33 +1,25 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
import logging
|
||||||
|
from subprocess import Popen, PIPE, check_call
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parseArgs()
|
parseArgs()
|
||||||
|
|
||||||
|
|
||||||
def parseArgs():
|
def parseArgs():
|
||||||
print '***** ***** ***** *****'
|
print("***** ***** ***** *****")
|
||||||
print ' * Pic *** Seal *'
|
print (" ** Pic * Seal ** ")
|
||||||
print '***** ***** ***** *****\n'
|
print("***** ***** ***** *****\n")
|
||||||
parser = argparse.ArgumentParser(description="Fingerprint a sqlite database based on its schema")
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-db', '--database', required=False, help="path to file to be fingerprinted")
|
parser.add_argument('-i', '--image', required=False, help="source image file")
|
||||||
parser.add_argument('-fd', '--fpdir', required=False, help="path to directory of fingerprint files, compare each file")
|
|
||||||
parser.add_argument('-fp', '--fingerprint', required=False, help="fingerprint file to use in comparison")
|
|
||||||
parser.add_argument('-ad', '--android_dir', required=False, help="path to a directory with android folder structure sqlite files")
|
|
||||||
parser.add_argument('-dd', '--data_dir', required=False, help="path to a directory to search for sqlite files")
|
|
||||||
# parser.add_argument('-idx', '--index_fingerprints', required=False, help="path to a directory with sqlite files, index fingerprints if no other args given")
|
|
||||||
parser.add_argument('-an', '--app_name', required=False)
|
|
||||||
parser.add_argument('-av', '--app_version', required=False)
|
|
||||||
parser.add_argument('-n', '--notes', required=False)
|
|
||||||
parser.add_argument('-idx', action='store_true', help="add a fingerprint to the index")
|
|
||||||
parser.add_argument('-md5', required=False, help="md5 hash to query the index`")
|
|
||||||
parser.add_argument('-android_pull', action='store_true', help="automated pull of applications from a physical android phone")
|
|
||||||
parser.add_argument('-v', '--verbose', action='store_true', help="will set logging level to INFO")
|
parser.add_argument('-v', '--verbose', action='store_true', help="will set logging level to INFO")
|
||||||
parser.add_argument('-vv', '--vverbose', action='store_true', help="will set logging level to DEBUG")
|
parser.add_argument('-vv', '--vverbose', action='store_true', help="will set logging level to DEBUG")
|
||||||
parser.add_argument('-l', '--logging', action='store_true', help="will supercede the -v option and send all logging to a file, logging.DEBUG")
|
parser.add_argument('-l', '--logging', action='store_true', help="will supercede the -v option and send all logging to a file, logging.DEBUG")
|
||||||
# parser.add_argument('-t', '--title', required=False)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if (args.logging):
|
if (args.logging):
|
||||||
|
@ -39,41 +31,13 @@ def parseArgs():
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
else:
|
else:
|
||||||
logging.basicConfig(level=logging.CRITICAL)
|
logging.basicConfig(level=logging.CRITICAL)
|
||||||
|
|
||||||
if args.fpdir and args.idx and (args.database or args.fingerprint):
|
if (args.image):
|
||||||
insertFP(args.database, args.fingerprint, args.fpdir)
|
pass
|
||||||
elif args.fpdir and args.idx:
|
|
||||||
indexFingerprints(args.fpdir)
|
|
||||||
elif (args.database and args.fingerprint):
|
|
||||||
compareFingerprint(args.database, args.fingerprint)
|
|
||||||
elif (args.fpdir and (args.database or args.fingerprint)):
|
|
||||||
compareFPIndex(args.fpdir, args.database, args.fingerprint)
|
|
||||||
elif (args.fpdir and args.md5):
|
|
||||||
queryMD5(args.fpdir, args.md5)
|
|
||||||
elif (args.android_dir):
|
|
||||||
androidData(args.android_dir)
|
|
||||||
elif (args.android_pull):
|
|
||||||
androidPull()
|
|
||||||
elif (args.database):
|
|
||||||
createFingerprint(args.database, args.app_name, args.app_version, args.notes)
|
|
||||||
else:
|
else:
|
||||||
print 'Create fingerprint:'
|
print('Create PicSeal images')
|
||||||
print ' dbfp.py -db <database_file>\n'
|
print(' picseal.py -i <image_file>')
|
||||||
print 'Create fingerprint index:'
|
print('\n***** ***** ***** *****\n')
|
||||||
print ' dbfp.py -fd <fingerprint_dir> -idx\n'
|
|
||||||
print 'Add fingerprint to index:'
|
|
||||||
print ' dbfp.py -fp <fingerprint_file> -idx (-db <database_file> | -fp <fingerprint_file>)\n'
|
|
||||||
print 'Compare fingerprint to a database file:'
|
|
||||||
print ' dbfp.py -fp <fingerprint_file> -db <database_file>\n'
|
|
||||||
print 'Lookup fingerprint from index:'
|
|
||||||
print ' dbfp.py -fd <fingerprint_dir> -fp <fingerprint_file>)\n'
|
|
||||||
print 'Lookup database from index:'
|
|
||||||
print ' dbfp.py -fd <fingerprint_dir> -db <database_file>\n'
|
|
||||||
print 'Lookup MD5 hash from index:'
|
|
||||||
print ' dbfp.py -fd <fingerprint_dir> -md5 <md5_hash_string>\n'
|
|
||||||
print 'Android App pull and fingerprint:'
|
|
||||||
print ' dbfp.py -android_pull'
|
|
||||||
print '\n***** ***** ***** *****\n'
|
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue