Ejemplo n.º 1
0
def main():
    """Main controller"""
    init_logger(join(localstatedir, 'log', LOGFILE))
    config = NetbiosTrackerConfig()

    start = time.time()
    _logger.info('=== Starting netbiostracker ===')

    addresses = tracker.get_addresses_to_scan(config.get_exceptions())
    scanresult = tracker.scan(addresses)
    parsed_results = tracker.parse(scanresult, config.get_encoding())
    tracker.update_database(parsed_results)

    _logger.info('Scanned %d addresses, got %d results in %.2f seconds',
                 len(addresses), len(parsed_results), time.time() - start)
    _logger.info('Netbiostracker done')
Ejemplo n.º 2
0
def main():
    """Main controller"""
    init_generic_logging(logfile=join(localstatedir, 'log', LOGFILE),
                         stderr=False)
    config = NetbiosTrackerConfig()

    start = time.time()
    _logger.info('=== Starting netbiostracker ===')

    addresses = tracker.get_addresses_to_scan(config.get_exceptions())
    scanresult = tracker.scan(addresses)
    parsed_results = tracker.parse(scanresult, config.get_encoding())
    tracker.update_database(parsed_results)

    _logger.info('Scanned %d addresses, got %d results in %.2f seconds',
                 len(addresses), len(parsed_results), time.time() - start)
    _logger.info('Netbiostracker done')