mirror of
https://github.com/cisagov/snafflepy
synced 2026-09-24 18:22:23 +00:00
Merge branch 'main' into dev
This commit is contained in:
@@ -25,6 +25,7 @@ class Rules:
|
|||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
def is_interest(file):
|
def is_interest(file):
|
||||||
# massive_wordlist = prepare_classifiers()
|
# massive_wordlist = prepare_classifiers()
|
||||||
# print(massive_wordlist)
|
# print(massive_wordlist)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ def begin_snaffle(options):
|
|||||||
# filelist.append(file)
|
# filelist.append(file)
|
||||||
# Ask do they want file sizes?
|
# Ask do they want file sizes?
|
||||||
# log.info(f"{target} Found file in {share}: {file.get_longname()}")
|
# log.info(f"{target} Found file in {share}: {file.get_longname()}")
|
||||||
naive_classify(share, file)
|
naive_classify(share, file, prepped_rules)
|
||||||
# log.info(f"{target} Found file in {share}: {file}")
|
# log.info(f"{target} Found file in {share}: {file}")
|
||||||
except FileListError:
|
except FileListError:
|
||||||
log.error(
|
log.error(
|
||||||
@@ -166,11 +166,11 @@ def list_computers(connection: Connection, domain):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
def naive_classify(share, file):
|
def naive_classify(share, file, rules:Rules):
|
||||||
log.info(f"{share}: {file.get_longname()}")
|
log.info(f"{share}: {file.get_longname()}")
|
||||||
|
|
||||||
|
|
||||||
if is_interest(file):
|
if is_interest(file, rules):
|
||||||
log.info(f"Found interesting file: {share}/{file}")
|
log.info(f"Found interesting file: {share}/{file}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user