2021-06-10 16:25:13 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
2021-06-14 23:26:44 +02:00
|
|
|
from generator import get_version, write_to_file, Dns, consolidate_networks, create_resolver
|
2021-06-10 16:25:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2021-06-14 23:26:44 +02:00
|
|
|
spf = Dns(create_resolver())
|
2021-06-10 16:25:13 +02:00
|
|
|
warninglist = {
|
|
|
|
'name': "List of known Gmail sending IP ranges",
|
|
|
|
'version': get_version(),
|
|
|
|
'description': "List of known Gmail sending IP ranges (https://support.google.com/a/answer/27642?hl=en)",
|
|
|
|
'matching_attributes': ["ip-src", "ip-dst", "domain|ip"],
|
|
|
|
'type': 'cidr',
|
2021-06-14 23:26:44 +02:00
|
|
|
'list': consolidate_networks(spf.get_ip_ranges_from_spf("gmail.com")),
|
2021-06-10 16:25:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
write_to_file(warninglist, "google-gmail-sending-ips")
|