示例#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)