From 5d71257abe84f51a9c443a6bb8f64d0e7bf6d553 Mon Sep 17 00:00:00 2001 From: AddV <1786276856@qq.com> Date: Sat, 31 Aug 2019 01:31:27 +0800 Subject: [PATCH] fix bug for multiple condition Before correction, the result is the union of the results of all conditions. After correction, the result is the intersection of the results of all conditions. --- LibcSearcher.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LibcSearcher.py b/LibcSearcher.py index 341f29c..0896cce 100755 --- a/LibcSearcher.py +++ b/LibcSearcher.py @@ -47,9 +47,12 @@ def decided(self): for ff in files: fd = open(db + ff, "rb") data = fd.read().decode(errors='ignore').split("\n") + not_match = False for x in res: - if any(map(lambda line: x.match(line), data)): - result.append(ff) + if not any(map(lambda line: x.match(line), data)): + not_match = True + if not not_match: + result.append(ff) fd.close() if len(result) == 0: