예제 #1
0
    def __init__(self):
        super(RoutersploitInterpreter, self).__init__()

        self.current_module = None
        self.raw_prompt_template = None
        self.module_prompt_template = None
        self.prompt_hostname = 'rsf'

        self.modules = utils.index_modules()
        self.main_modules_dirs = [module for module in os.listdir(utils.MODULES_DIR) if not module.startswith("__")]

        self.__parse_prompt()

        self.banner = """ ______            _            _____       _       _ _
 | ___ \          | |          /  ___|     | |     (_) |
 | |_/ /___  _   _| |_ ___ _ __\ `--. _ __ | | ___  _| |_
 |    // _ \| | | | __/ _ \ '__|`--. \ '_ \| |/ _ \| | __|
 | |\ \ (_) | |_| | ||  __/ |  /\__/ / |_) | | (_) | | |_
 \_| \_\___/ \__,_|\__\___|_|  \____/| .__/|_|\___/|_|\__|
                                     | |
     Router Exploitation Framework   |_|

 Dev Team : Marcin Bury (lucyoa) & Mariusz Kupidura (fwkz)
 Codename : Bad Blood
 Version  : 2.1.0

 Total module count: {modules_count}
""".format(modules_count=len(self.modules))
예제 #2
0
    def __init__(self):
        super(RoutersploitInterpreter, self).__init__()

        self.current_module = None
        self.raw_prompt_template = None
        self.module_prompt_template = None
        self.prompt_hostname = 'rsf'

        self.modules = utils.index_modules()
        self.main_modules_dirs = [
            module for module in os.listdir(utils.MODULES_DIR)
            if not module.startswith("__")
        ]

        self.__parse_prompt()

        self.banner = """ ______            _            _____       _       _ _
 | ___ \          | |          /  ___|     | |     (_) |
 | |_/ /___  _   _| |_ ___ _ __\ `--. _ __ | | ___  _| |_
 |    // _ \| | | | __/ _ \ '__|`--. \ '_ \| |/ _ \| | __|
 | |\ \ (_) | |_| | ||  __/ |  /\__/ / |_) | | (_) | | |_
 \_| \_\___/ \__,_|\__\___|_|  \____/| .__/|_|\___/|_|\__|
                                     | |
     Router Exploitation Framework   |_|

 Dev Team : Marcin Bury (lucyoa) & Mariusz Kupidura (fwkz)
 Codename : Bad Blood
 Version  : 2.1.0

 Total module count: {modules_count}
""".format(modules_count=len(self.modules))
예제 #3
0
    def __init__(self):
        super(RoutersploitInterpreter, self).__init__()
        PrinterThread().start()

        self.current_module = None
        self.raw_prompt_template = None
        self.module_prompt_template = None
        self.prompt_hostname = 'rsf'
        self.show_sub_commands = ('info', 'options', 'devices', 'all', 'creds', 'exploits', 'scanners')

        self.global_commands = sorted(['use ', 'exec ', 'help', 'exit', 'show '])
        self.module_commands = ['run', 'back', 'set ', 'setg ', 'check']
        self.module_commands.extend(self.global_commands)
        self.module_commands.sort()

        self.modules = utils.index_modules()
        self.main_modules_dirs = [module for module in os.listdir(utils.MODULES_DIR) if not module.startswith("__")]

        self.__parse_prompt()

        self.banner = """ ______            _            _____       _       _ _
 | ___ \          | |          /  ___|     | |     (_) |
 | |_/ /___  _   _| |_ ___ _ __\ `--. _ __ | | ___  _| |_
 |    // _ \| | | | __/ _ \ '__|`--. \ '_ \| |/ _ \| | __|
 | |\ \ (_) | |_| | ||  __/ |  /\__/ / |_) | | (_) | | |_
 \_| \_\___/ \__,_|\__\___|_|  \____/| .__/|_|\___/|_|\__|
                                     | |
     Router Exploitation Framework   |_|

 Dev Team : Marcin Bury (lucyoa) & Mariusz Kupidura (fwkz)
 Codename : Bad Blood
 Version  : 2.2.1

 Total module count: {modules_count}
""".format(modules_count=len(self.modules))
예제 #4
0
    def __init__(self):
        super(RoutersploitInterpreter, self).__init__()
        PrinterThread().start()

        self.current_module = None
        self.raw_prompt_template = None
        self.module_prompt_template = None
        self.prompt_hostname = 'rsf'
        self.show_sub_commands = ('info', 'options', 'devices', 'all', 'creds', 'exploits', 'scanners')

        self.global_commands = sorted(['use ', 'exec ', 'help', 'exit', 'show ', 'search '])
        self.module_commands = ['run', 'back', 'set ', 'setg ', 'check']
        self.module_commands.extend(self.global_commands)
        self.module_commands.sort()

        self.modules = utils.index_modules()
        self.main_modules_dirs = [module for module in os.listdir(utils.MODULES_DIR) if not module.startswith("__")]

        self.__parse_prompt()

        self.banner = """ ______            _            _____       _       _ _
 | ___ \          | |          /  ___|     | |     (_) |
 | |_/ /___  _   _| |_ ___ _ __\ `--. _ __ | | ___  _| |_
 |    // _ \| | | | __/ _ \ '__|`--. \ '_ \| |/ _ \| | __|
 | |\ \ (_) | |_| | ||  __/ |  /\__/ / |_) | | (_) | | |_
 \_| \_\___/ \__,_|\__\___|_|  \____/| .__/|_|\___/|_|\__|
                                     | |
     Router Exploitation Framework   |_|

 Dev Team : Marcin Bury (lucyoa) & Mariusz Kupidura (fwkz)
 Codename : Bad Blood
 Version  : 2.2.1

 Total module count: {modules_count}
""".format(modules_count=len(self.modules))
예제 #5
0
    def test_load_modules_import_error_02(self, mock_walk):
        mock_walk.return_value = (
            ('/Abs/Path/routersploit/routersploit/modules', ['asmax', 'creds'],
             ['__init__.py', '__init__.pyc']),
            ('/Abs/Path/routersploit/routersploit/modules/creds', [], [
                '__init__.py', '__init__.pyc', 'ftp_bruteforce.py',
                'ftp_bruteforce.pyc'
            ]),
            ('/Abs/Path/routersploit/routersploit/modules/exploits/asmax', [],
             [
                 '__init__.py', '__init__.pyc', 'asmax_exploit.py',
                 'asmax_exploit.pyc', 'asmax_multi.py', 'asmax_multi.pyc'
             ]),
        )

        path = 'path/to/module'
        modules = utils.index_modules(path)

        mock_walk.assert_called_once_with(path)

        self.assertEqual(modules, [
            'creds.ftp_bruteforce',
            'exploits.asmax.asmax_exploit',
            'exploits.asmax.asmax_multi',
        ])
예제 #6
0
    def test_load_modules_import_error_02(self, mock_walk):
        mock_walk.return_value = (
            ('/Abs/Path/routersploit/routersploit/modules', ['asmax', 'creds'],
             ['__init__.py', '__init__.pyc']),
            ('/Abs/Path/routersploit/routersploit/modules/creds', [],
             ['__init__.py', '__init__.pyc', 'ftp_bruteforce.py',
              'ftp_bruteforce.pyc']),
            ('/Abs/Path/routersploit/routersploit/modules/exploits/asmax', [],
             ['__init__.py', '__init__.pyc', 'asmax_exploit.py',
              'asmax_exploit.pyc', 'asmax_multi.py', 'asmax_multi.pyc']),
        )

        path = 'path/to/module'
        modules = utils.index_modules(path)

        mock_walk.assert_called_once_with(path)

        self.assertEqual(
            modules,
            [
                'creds.ftp_bruteforce',
                'exploits.asmax.asmax_exploit',
                'exploits.asmax.asmax_multi',
            ]
        )
예제 #7
0
    def __init__(self):
        super(RoutersploitInterpreter, self).__init__()
        PrinterThread().start()

        self.current_module = None
        self.raw_prompt_template = None
        self.module_prompt_template = None
        self.prompt_hostname = 'rsf'
        self.show_sub_commands = (
            'info', 'options', 'devices', 'all',
            'creds', 'exploits', 'scanners'
        )

        self.global_commands = sorted(
            ['use ', 'exec ', 'help', 'exit', 'show ', 'search ']
        )
        self.module_commands = self._extend_with_global_commands(
            ['run', 'back', 'set ', 'setg ', 'check']
        )
        self.payload_commands = self._extend_with_global_commands(
            ['run', 'back', 'set ', 'setg ']
        )

        self.modules = utils.index_modules()
        self.modules_count = Counter()
        [self.modules_count.update(module.split('.')) for module in self.modules]
        self.main_modules_dirs = [module for module in os.listdir(utils.MODULES_DIR) if not module.startswith("__")]

        self.__parse_prompt()

        self.banner = """ ______            _            _____       _       _ _
 | ___ \          | |          /  ___|     | |     (_) |
 | |_/ /___  _   _| |_ ___ _ __\ `--. _ __ | | ___  _| |_
 |    // _ \| | | | __/ _ \ '__|`--. \ '_ \| |/ _ \| | __|
 | |\ \ (_) | |_| | ||  __/ |  /\__/ / |_) | | (_) | | |_
 \_| \_\___/ \__,_|\__\___|_|  \____/| .__/|_|\___/|_|\__|
                                     | |
        IoT Exploitation Framework   |_|

 Dev Team : Marcin Bury (lucyoa) & Mariusz Kupidura (fwkz)
 Codename : Bad Blood
 Version  : 2.2.1

 Exploits: {exploits_count} Scanners: {scanners_count} Creds: {creds_count} Payloads: {payloads_count}
""".format(exploits_count=self.modules_count['exploits'],
           scanners_count=self.modules_count['scanners'],
           creds_count=self.modules_count['creds'],
           payloads_count=self.modules_count['payloads'])