当前位置: 首页>>代码示例>>Python>>正文


Python tables.table函数代码示例

本文整理汇总了Python中w3af.core.ui.console.tables.table函数的典型用法代码示例。如果您正苦于以下问题:Python table函数的具体用法?Python table怎么用?Python table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了table函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show_progress_on_request

    def show_progress_on_request(self):
        """
        When the user hits enter, show the progress
        """
        while self._w3af.status.is_running():

            # Define some variables...
            user_press_enter = False

            # TODO: This if is terrible! I need to remove it!
            # read from sys.stdin with a 0.5 second timeout
            if sys.platform != "win32":
                # linux
                rfds, wfds, efds = select.select([sys.stdin], [], [], 0.5)
                if rfds:
                    if len(sys.stdin.readline()):
                        user_press_enter = True
            else:
                # windows
                import msvcrt

                time.sleep(0.3)
                if msvcrt.kbhit():
                    if term.read(1) in ["\n", "\r", "\r\n", "\n\r"]:
                        user_press_enter = True

            # If something was written to sys.stdin, read it
            if user_press_enter:

                # Get the information and print it to the user
                status_information_str = self._w3af.status.get_long_status()
                t = table([(status_information_str,)])
                t.draw()
                om.out.console("")
开发者ID:BioSoundSystems,项目名称:w3af,代码行数:34,代码来源:rootMenu.py

示例2: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result["os"]:
            return "Remote OS not identified."
        else:
            rows = []
            rows.append(["Remote OS", api_result["os"]])
            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:ZionOps,项目名称:w3af,代码行数:11,代码来源:os_fingerprint.py

示例3: run_read

    def run_read(self):
        api_result = self.api_read()

        rows = []
        rows.append(['Description', 'Value'])
        rows.append([])
        for key in api_result:
            rows.append([key, str(api_result[key])])

        result_table = table(rows)
        result_table.draw(80)
        return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:12,代码来源:netcat_installed.py

示例4: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'No MySQL configuration directories were found.'
        else:
            rows = [['MySQL configuration directory'], []]
            for directory in api_result['directory']:
                rows.append([directory, ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:13,代码来源:mysql_config_directory.py

示例5: run_read

    def run_read(self, output_directory):
        api_result = self.api_read(output_directory)

        if not api_result:
            return 'Failed to download the application source code.'
        else:
            rows = [['Remote file', 'Local file', ], []]

            for url, (remote_filename, local_filename) in api_result.items():
                rows.append([remote_filename, local_filename])

            result_table = table(rows)
            result_table.draw(140)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:14,代码来源:get_source_code.py

示例6: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result['kernel_version']:
            return 'Failed to identify kernel version.'
        else:
            rows = []
            rows.append(['Kernel version', ])
            rows.append([])
            rows.append([api_result['kernel_version'], ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:14,代码来源:kernel_version.py

示例7: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result['apache_directory']:
            return 'Apache configuration directory not found.'
        else:
            rows = [['Apache directories', ], []]
            for key_name in api_result:
                for path in api_result[key_name]:
                    rows.append([path, ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:14,代码来源:apache_config_directory.py

示例8: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'MySQL configuration files not found.'
        else:
            rows = [['MySQL configuration file', 'Content'], []]
            for filename in api_result:
                rows.append([filename, api_result[filename]])
                rows.append([])

            result_table = table(rows[:-1])
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:14,代码来源:mysql_config.py

示例9: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return "No MySQL configuration directories were found."
        else:
            rows = []
            rows.append(["MySQL configuration directory"])
            rows.append([])
            for directory in api_result["directory"]:
                rows.append([directory])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:masterapocalyptic,项目名称:Tortazo-spanishtranslate,代码行数:15,代码来源:mysql_config_directory.py

示例10: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'No user configuration files found.'
        else:
            rows = []
            rows.append(['User configuration files', ])
            rows.append([])
            for filename in api_result:
                rows.append([filename, ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:users_config_files.py

示例11: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'Domain name not found.'
        else:
            rows = []
            rows.append(['Domain name', ])
            rows.append([])
            for domain in api_result.values():
                rows.append([domain, ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:domainname.py

示例12: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return "No hashes were found."
        else:
            rows = []
            rows.append(["User", "Hash"])
            rows.append([])
            for user, uhash in api_result.items():
                rows.append([user, uhash])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:ZionOps,项目名称:w3af,代码行数:15,代码来源:get_hashes.py

示例13: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result['apache_config']:
            return 'Apache configuration files not found.'
        else:
            rows = []
            rows.append(['Apache configuration files'])
            rows.append([])
            for key_name in api_result:
                for filename, file_content in api_result[key_name].items():
                    rows.append([filename, ])
            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:apache_config_files.py

示例14: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'No CPU information found.'
        else:
            rows = []
            rows.append(['Description', 'Value'])
            rows.append([])
            for name in api_result:
                rows.append([name, api_result[name]])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:cpu_info.py

示例15: run_read

    def run_read(self):
        api_result = self.api_read()

        if not api_result:
            return 'No log files not found.'
        else:
            rows = []
            rows.append(['Log files'])
            rows.append([])
            for filename in api_result:
                rows.append([filename, ])

            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:log_reader.py


注:本文中的w3af.core.ui.console.tables.table函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。