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


Python swing.JList方法代码示例

本文整理汇总了Python中javax.swing.JList方法的典型用法代码示例。如果您正苦于以下问题:Python swing.JList方法的具体用法?Python swing.JList怎么用?Python swing.JList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing的用法示例。


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

示例1: __init__

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JList [as 别名]
def __init__(self, burp_callbacks):
        self._burp_callbacks = burp_callbacks

        self._type_list_component = JList(blackboxprotobuf.known_messages.keys())
        self._type_list_component.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)

        self._component = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
        self._component.setLeftComponent(JScrollPane(self._type_list_component))
        self._component.setRightComponent(self.createButtonPane())
        self._component.setResizeWeight(0.9) 
开发者ID:nccgroup,项目名称:blackboxprotobuf,代码行数:12,代码来源:typedef_tab.py

示例2: findInteresting

# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JList [as 别名]
def findInteresting(self, host, headers):
        list_boring_headers = []
        model = self.boringHeadersList.getModel()
   
        # Get list of boring headers from the GUI JList
        for i in range(0, model.getSize()):
            list_boring_headers.append(model.getElementAt(i))
        
        issuename = "Interesting Header(s)"
        issuelevel = "Low"
        issuedetail = "<p>The response includes the following potentially interesting headers:</p><ul>"
        log = "[+] Interesting Headers found: " + host + "\n"
        found = 0

        for header in headers:
            if header.lower() not in list_boring_headers:
                issuedetail += "<li>Header name: <b>" + header + "</b>. Header value: <b>" + headers[header] + "</b></li>"

                log += "    Header name:" + header + " Header value:" + headers[header] + "\n"
                
                host = self._requestResponse.getHttpService().getHost()
                report = header + ":" + headers[header]
                if report not in self.global_issues[host]["Interesting"]:   # If header not already in the list we store it
                    self.global_issues[host]["Interesting"].append(report)

                found += 1
        
        issuedetail += "</ul>"

        if found > 0:
            # Create a ScanIssue object and append it to our list of issues, marking the reflected parameter value in the response.
            self.scan_issues.append(ScanIssue(self._requestResponse.getHttpService(),
	            self._helpers.analyzeRequest(self._requestResponse).getUrl(), 
                issuename, issuelevel, issuedetail))

            self.logsTA.append(log) 
开发者ID:Dionach,项目名称:HeadersAnalyzer,代码行数:38,代码来源:HeadersAnalyzer.py


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