From aedb3198cdf6c7c8852e2f37f95d299b8bbdf718 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Mon, 8 Aug 2016 11:54:27 +0200 Subject: [PATCH] Fixed bug in CVE (always sending to browse_warning even if there was no match) --- bin/Cve.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/Cve.py b/bin/Cve.py index 1e152463..97e5aaae 100755 --- a/bin/Cve.py +++ b/bin/Cve.py @@ -25,6 +25,11 @@ def search_cve(message): print('{} contains CVEs'.format(paste.p_name)) publisher.warning('{} contains CVEs'.format(paste.p_name)) + #send to Browse_warning_paste + p.populate_set_out('cve;{}'.format(filepath), 'BrowseWarningPaste') + #Send to duplicate + p.populate_set_out(filepath, 'Duplicate') + if __name__ == '__main__': # If you wish to use an other port of channel, do not forget to run a subscriber accordingly (see launch_logs.sh) # Port of the redis instance used by pubsublogger @@ -53,8 +58,3 @@ if __name__ == '__main__': # Do something with the message from the queue search_cve(message) - #send to Browse_warning_paste - filepath, count = message.split() - p.populate_set_out('cve;{}'.format(filepath), 'BrowseWarningPaste') - #Send to duplicate - p.populate_set_out(filepath, 'Duplicate')