summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fbin-scanner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/fbin-scanner.py b/fbin-scanner.py
index 05f8739..37639c1 100644
--- a/fbin-scanner.py
+++ b/fbin-scanner.py
@@ -101,6 +101,12 @@ def main():
digest = h.hexdigest()
logger.info('SHA-256: %s', digest)
report = get_report(dbfile, digest, f)
+ except FileNotFoundError:
+ logger.error('Skipping non-existent file %s/%s', dbfile.filename, dbfile.hash)
+ dbfile.scanned = True
+ db.session.add(dbfile)
+ db.session.commit()
+ continue
except:
logger.exception('Failed to get report for %s/%s', dbfile.filename, dbfile.hash)
# Most likely an error from virustotal, so just break here and retry later.