def test_threads(self): ''' filter threads test ''' threads = Filter.threads(0) if isinstance(threads, (int, float)): self.assertTrue(self.is_numeric(threads)) self.assertGreater(threads, 0) try: float(threads) except ValueError: return False else: return True
def test_delay(self): ''' filter delay test ''' delay = Filter.delay(1) self.assertEqual(delay, 1)
def test_port(self): ''' filter port test ''' port = Filter.port(8080) self.assertEqual(port, 8080)
def test_debug(self): ''' filter debug test ''' debug = Filter.debug(1) self.assertEqual(debug, 1)
def test_check(self): ''' filter check test ''' check = Filter.check('unknown') self.assertEqual(check, 'directories')
#! /usr/bin/env python # OpenDoor Web Directory Scanner # Copyright (C) 2016 Stanislav Menshov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Development Team: Stanislav Menshov (Stanislav WEB) from Libraries import Command, Filter as FilterArgs, Controller, Version; version = Version(); command = Command(); filter_args = FilterArgs(); args = [] version.banner(); if command.get_arg_values(): args = filter_args.call(command) Controller(args)
def test_delay(self): delay = Filter.delay(1) self.assertEqual(delay, 1)
def test_debug(self): debug = Filter.debug(1) self.assertEqual(debug, 1)
def test_threads(self): threads = Filter.threads(0) self.assertTrue(self.__isNumeric(threads)) self.assertGreater(threads, 0)