mirror of
https://github.com/adulau/MalwareClassifier.git
synced 2024-12-22 08:46:04 +00:00
17 lines
444 B
Python
17 lines
444 B
Python
import argparse
|
|
import sys
|
|
import redis
|
|
|
|
argParser = argparse.ArgumentParser(description='Malware classifier')
|
|
argParser.add_argument('-f', action='append', help='Filename')
|
|
args = argParser.parse_args()
|
|
|
|
r = redis.StrictRedis(host='localhost', port=6379, db=0)
|
|
|
|
if args.f is not None:
|
|
md5 = args.f[0].split(".")[0]
|
|
r.sadd('processed', md5)
|
|
for line in sys.stdin:
|
|
print (line.split(",")[0])
|
|
else:
|
|
argParser.print_help()
|