зеркало из https://github.com/mozilla/MozDef.git
Resolving PEP 8 errors
This commit is contained in:
Родитель
88a43b942a
Коммит
e191cb2e4a
|
@ -49,15 +49,13 @@ def enrich(alert, known_ips):
|
|||
|
||||
return []
|
||||
|
||||
|
||||
def ip_in_range(ip):
|
||||
return lambda known: netaddr.IPAddress(ip) in netaddr.IPSet([known['range']])
|
||||
|
||||
|
||||
ips = find_ips(alert)
|
||||
|
||||
alert = alert.copy()
|
||||
|
||||
|
||||
alert['details']['sites'] = []
|
||||
|
||||
for ip in set(ips):
|
||||
|
@ -65,7 +63,7 @@ def enrich(alert, known_ips):
|
|||
|
||||
for desc in matching_descriptions:
|
||||
enriched = desc['format'].format(ip, desc['site'])
|
||||
|
||||
|
||||
alert['summary'] += '; ' + enriched
|
||||
|
||||
alert['details']['sites'].append({
|
||||
|
|
Загрузка…
Ссылка в новой задаче