From 3765c7e999dc6e866b290128e84139f87c3c4dba Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Wed, 21 Aug 2024 11:11:17 +0200 Subject: [PATCH] =?UTF-8?q?domains=20reader/reader.py=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domains reader/reader.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 domains reader/reader.py diff --git a/domains reader/reader.py b/domains reader/reader.py deleted file mode 100644 index e6eb97f..0000000 --- a/domains reader/reader.py +++ /dev/null @@ -1,22 +0,0 @@ -import re - -print ('Domains Counter') - -pattern = "[\w-]*\.\w{2,}$" -domains ={} -file = open("malware.txt", "r") -for line in file: - result = re.search(pattern, line.strip()) - if (result): - domain = result.group() - if (domain in domains): - domains[domain] = domains[domain] + 1 - else: - domains[domain] = 1 - -file.close() - -domains_sorted = sorted(domains.items(), key=lambda y:y[1]) - -print (domains_sorted) -