From 348acbb3f7947f2527b2e5491bbaf9424fc41c96 Mon Sep 17 00:00:00 2001 From: Julien (jvoisin) Voisin Date: Wed, 24 Feb 2016 18:08:29 +0100 Subject: pep8++ --- php-malware-finder/generate_whitelist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php-malware-finder/generate_whitelist.py b/php-malware-finder/generate_whitelist.py index 791bab9..6c2e03e 100644 --- a/php-malware-finder/generate_whitelist.py +++ b/php-malware-finder/generate_whitelist.py @@ -24,12 +24,12 @@ for cpt, (root, dirnames, filenames) in enumerate(os.walk(sys.argv[2])): if os.stat(fname).st_size: matches = rules.match(os.path.join(root, filename), fast=True) if matches: - matches = matches.pop() # only one match, since we're scaning files + matches = matches.pop() # only one match, since we're scaning files output_list.append('hash.sha1(0, filename) == %s or // %s' % (hashlib.sha1(fname).hexdigest(), fname)) output_rule = 'private rule %s\n{\n\tcondition:\n\t\t/* %s */\n\t\t' % (sys.argv[1].split(' ')[0], sys.argv[1]) output_list.append(output_list.pop().replace(' or ', ' ')) output_rule += '\n\t\t'.join(output_list) -output_rule +='\n}' +output_rule += '\n}' print output_rule -- cgit v1.3