Esempio n. 1
0
    def test_threads(self):
        ''' filter threads test '''

        threads = Filter.threads(0)

        if isinstance(threads, (int, float)):
            self.assertGreater(threads, 0)
        try:
            float(threads)
        except ValueError:
            return False
        else:
            return True
Esempio n. 2
0
    def test_delay(self):
        ''' filter delay test '''

        delay = Filter.delay(1)
        self.assertEqual(delay, 1)
Esempio n. 3
0
    def test_debug(self):
        ''' filter debug test '''

        debug = Filter.debug(1)
        self.assertEqual(debug, 1)
Esempio n. 4
0
    def test_port(self):
        ''' filter port test '''

        port = Filter.port(8080)
        self.assertEqual(port, 8080)
Esempio n. 5
0
    def test_sheme(self):
        ''' filter sheme test '''

        url = Filter.scheme('test.com')
        self.assertRegexpMatches(url, r'^http')
Esempio n. 6
0
    def test_check(self):
        ''' filter check test '''

        check = Filter.check('unknown')
        self.assertEqual(check, 'directories')
Esempio n. 7
0
    import threadpool
    import linereader
    import colorama
    import coloredlogs
    import termcolor
    import logging
    import verboselogs
    import tabulate

except ImportError:
    exit("""\t\t[!] Several dependencies wasn't installed!
                Please run sudo pip install -r requirements.txt """)

if __name__ == "__main__":
    from Libraries.Command import Command
    from Libraries.Controller import Controller
    from Libraries.Version import Version
    from Libraries.Filter import Filter as FilterArgs

    version = Version()
    command = Command()
    filter_args = FilterArgs()
    args_values = command.get_arg_values()
    args = []

    version.banner()

    if args_values:
        args = filter_args.call(command)
        Controller(args)