Пример #1
0
    def __init__(self):
        super(DomainScanCLI, self).__init__()
        self.scanner = DomainScanner
        self.checks = defaultDomainChecks

        p = ArgParser(
            description = 'Scrutinize Domain Scanner',
            epilog = 'Use @ to read arguments from file, e.g.: {0} @domainlist.txt'.format(sys.argv[0]),
            fromfile_prefix_chars='@',
        )
        p.add_argument('-c', '--checks',
                       nargs = '+',
                       choices = [x.__module__.replace('checks.', '') + '.' + x.__name__ for x in domainChecks],
                       metavar = ('net.dns.TestA', 'net.http.TestB'),
                       help = 'specific checks to run')
        p.add_argument('-t', '--throttle',
                       type = int,
                       default = 10,
                       metavar = '10',
                       help = 'actions to perform concurrently')
        p.add_argument('-v', '--verbose',
                       action = 'store_true',
                       help = 'display additional debug information')
        p.add_argument('-w', '--warnings-only',
                       action = 'store_true',
                       help = 'only show results for tests that return warnings')
        p.add_argument('--no-color',
                       action = 'store_false',
                       dest = 'color',
                       help = 'disable output text coloring')
        p.add_argument('--class-names',
                       action = 'store_true',
                       dest = 'useCheckClassNames',
                       help = 'show names of checks rather than descriptions')
        p.add_argument('addresses',
                       nargs = '+',
                       metavar = 'example.com',
                       help = 'target domain name(s)')
        self.parser = p
Пример #2
0
    def __init__(self):
        super(LocalScanCLI, self).__init__()
        self.scanner = LocalScanner
        self.checks = localChecks

        p = ArgParser(
            description='Scrutinize Local Scanner',
            fromfile_prefix_chars='@',
        )
        p.add_argument('-c',
                       '--checks',
                       nargs='+',
                       choices=[
                           x.__module__.replace('checks.', '') + '.' +
                           x.__name__ for x in localChecks
                       ],
                       metavar=('local.blah.Bloo', 'local.blah.Blyy'),
                       help='specific checks to run')
        p.add_argument('-t',
                       '--throttle',
                       type=int,
                       default=10,
                       metavar='10',
                       help='actions to perform concurrently')
        p.add_argument('-v',
                       '--verbose',
                       action='store_true',
                       help='display additional debug information')
        p.add_argument('-w',
                       '--warnings-only',
                       action='store_true',
                       help='only show results for tests that return warnings')
        p.add_argument('--no-color',
                       action='store_false',
                       dest='color',
                       help='disable output text coloring')
        p.add_argument('--class-names',
                       action='store_true',
                       dest='useCheckClassNames',
                       help='show names of checks rather than descriptions')
        self.parser = p
Пример #3
0
    def __init__(self):
        super(DomainScanCLI, self).__init__()
        self.scanner = DomainScanner
        self.checks = defaultDomainChecks

        p = ArgParser(
            description='Scrutinize Domain Scanner',
            epilog='Use @ to read arguments from file, e.g.: {0} @domainlist.txt'
            .format(sys.argv[0]),
            fromfile_prefix_chars='@',
        )
        p.add_argument('-c',
                       '--checks',
                       nargs='+',
                       choices=[
                           x.__module__.replace('checks.', '') + '.' +
                           x.__name__ for x in domainChecks
                       ],
                       metavar=('net.dns.TestA', 'net.http.TestB'),
                       help='specific checks to run')
        p.add_argument('-t',
                       '--throttle',
                       type=int,
                       default=10,
                       metavar='10',
                       help='actions to perform concurrently')
        p.add_argument('-v',
                       '--verbose',
                       action='store_true',
                       help='display additional debug information')
        p.add_argument('-w',
                       '--warnings-only',
                       action='store_true',
                       help='only show results for tests that return warnings')
        p.add_argument('--no-color',
                       action='store_false',
                       dest='color',
                       help='disable output text coloring')
        p.add_argument('--class-names',
                       action='store_true',
                       dest='useCheckClassNames',
                       help='show names of checks rather than descriptions')
        p.add_argument('addresses',
                       nargs='+',
                       metavar='example.com',
                       help='target domain name(s)')
        self.parser = p
Пример #4
0
    def __init__(self):
        super(LocalScanCLI, self).__init__()
        self.scanner = LocalScanner
        self.checks = localChecks

        p = ArgParser(
            description = 'Scrutinize Local Scanner',
            fromfile_prefix_chars='@',
        )
        p.add_argument('-c', '--checks',
                       nargs = '+',
                       choices = [x.__module__.replace('checks.', '') + '.' + x.__name__ for x in localChecks],
                       metavar = ('local.blah.Bloo', 'local.blah.Blyy'),
                       help = 'specific checks to run')
        p.add_argument('-t', '--throttle',
                       type = int,
                       default = 10,
                       metavar = '10',
                       help = 'actions to perform concurrently')
        p.add_argument('-v', '--verbose',
                       action = 'store_true',
                       help = 'display additional debug information')
        p.add_argument('-w', '--warnings-only',
                       action = 'store_true',
                       help = 'only show results for tests that return warnings')
        p.add_argument('--no-color',
                       action = 'store_false',
                       dest = 'color',
                       help = 'disable output text coloring')
        p.add_argument('--class-names',
                       action = 'store_true',
                       dest = 'useCheckClassNames',
                       help = 'show names of checks rather than descriptions')
        self.parser = p