#!/usr/bin/env python3

import sys
import updater
import time

while True:

    print("Update...")

    print("Apility IPs...")
    try:
        u = updater.ApilityUpdater.ip_updater()
        u.update()
    except Exception as e:
        print(e)

    print("Apility domains...")
    try:
        u = updater.ApilityUpdater.domain_updater()
        u.update()
    except Exception as e:
        print(e)

    print("VT IPs...")
    try:
        u = updater.VirusTotalUpdater.ip_updater()
        u.update()
    except Exception as e:
        print(e)

    print("VT domains...")
    try:
        u = updater.VirusTotalUpdater.domain_updater()
        u.update()
    except Exception as e:
        print(e)

    print("FB IPs...")
    try:
        u = updater.FacebookUpdater.ip_updater()
        u.update()
    except Exception as e:
        print(e)

    print("FB domains...")
    try:
        u = updater.FacebookUpdater.domain_updater()
        u.update()
    except Exception as e:
        print(e)

    time.sleep(120)

