domains reader/reader.py gelöscht
This commit is contained in:
parent
79e941ec94
commit
3765c7e999
@ -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)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user