예제 #1
0
파일: keimpx.py 프로젝트: Warlockk/keimpx
def check_conf():
    global conf

    set_verbosity(conf.verbose)

    if conf.name is None:
        conf.name = socket.gethostname()

    conf.name = str(conf.name)

    if conf.port is None:
        conf.port = 445

    logger.debug('Using %s as local NetBIOS hostname' % conf.name)

    if conf.threads < 3:
        conf.threads = 3
        logger.info('Forcing number of threads to 3')

    targets = set_targets()
    credentials = set_credentials()
    domains = set_domains()

    for credential in credentials:
        if credential.domain is not None:
            if credential.domain not in domains:
                domains.append(credential.domain)

    if len(domains) == 0:
        logger.info('No domains specified, using a blank domain')
    elif len(domains) > 0:
        logger.info('Loaded %s unique domain%s' %
                    (len(domains), 's' if len(domains) > 1 else ''))

    return targets, credentials, domains
예제 #2
0
def check_conf():
    global conf

    set_verbosity(conf.verbose)

    if conf.name is None:
        conf.name = socket.gethostname()

    conf.name = str(conf.name)

    if conf.port is None:
        conf.port = 445

    logger.debug('Using %s as local NetBIOS hostname' % conf.name)

    if conf.threads < 3:
        conf.threads = 3
        logger.info('Forcing number of threads to 3')

    set_targets()
    set_credentials()
    set_domains()
예제 #3
0
 def do_verbosity(self, level):
     set_verbosity(level)