From 2fb0ece5d324f53f44fb3f8e3cca30686faa91cb Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Mon, 24 Jun 2019 10:02:22 +0200 Subject: [PATCH] fix regex and add test script --- test-uvscand | 9 +++++++++ uvscand/__init__.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 test-uvscand diff --git a/test-uvscand b/test-uvscand new file mode 100755 index 0000000..f515439 --- /dev/null +++ b/test-uvscand @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import sys +import uvscand + +if __name__ == '__main__': + sys.exit( + uvscand.main() + ) diff --git a/uvscand/__init__.py b/uvscand/__init__.py index 57071c2..0b26b5a 100755 --- a/uvscand/__init__.py +++ b/uvscand/__init__.py @@ -28,7 +28,7 @@ import time from subprocess import Popen, PIPE -uvscan_regex = re.compile(r"Found:?(?: the| potentially unwanted program| (?:virus|trojan) or variant)? (.+?)(?:\.| (?:virus |trojan )?", re.MULTILINE) +uvscan_regex = re.compile(r"Found:?(?: the| potentially unwanted program| (?:virus|trojan) or variant)? (.+?)(?:\.| (?:virus |trojan )?)", re.MULTILINE) async def run(uvscan, filename):