• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python tables.table函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: run_read

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

        if not api_result['apache_ssl_certificate'] and not api_result['apache_ssl_key']:
            return 'Apache SSL key and Certificate not found.'
        else:
            rows = []
            rows.append(['Description', 'Value'])
            rows.append([])
            for key_name in api_result:
                for desc, value in api_result[key_name].iteritems():
                    rows.append([desc, value])
            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:0x554simon,项目名称:w3af,代码行数:15,代码来源:apache_ssl.py


示例17: run_read

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

        rows = []
        rows.append(['Running inside Virtual Machine', ])
        rows.append([])

        if api_result['running_vm']:
            rows.append(['The remote host is a virtual machine.', ])
        else:
            rows.append(['The remote host is NOT a virtual machine.', ])

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


示例18: run_read

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

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


示例19: run_read

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

        if not api_result:
            return "ARP cache not found."
        else:
            rows = []
            rows.append(["IP address", "HW address", "Device"])
            rows.append([])
            for ip_address in api_result:
                hw_addr, device = api_result[ip_address]
                rows.append([ip_address, hw_addr, device])
            result_table = table(rows)
            result_table.draw(80)
            return rows
开发者ID:ZionOps,项目名称:w3af,代码行数:15,代码来源:arp_cache.py


示例20: run_read

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

        if not api_result:
            return 'No firefox files were identified.'
        else:
            rows = []
            rows.append(['Firefox file', 'Read access'])
            rows.append([])
            for filename in api_result:
                rows.append([filename, 'Yes'])

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python payload_handler.exec_payload函数代码示例发布时间:2022-05-26
下一篇:
Python console_ui.ConsoleUI类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap