Burp Suite 中,“附加扫描器”选项可以让您扫描主机中的常见漏洞,同时避免发送新请求给目标。代码示例如下:
示例代码:
# Import the necessary Burp Suite modules
from burp import IBurpExtender
from burp import IScannerCheck
from burp import IScanIssue
# Define a custom scanner check class
class CustomScannerCheck(IScannerCheck):
def doPassiveScan(self, baseRequestResponse):
# Check for common vulnerabilities in the host here
return None
def doActiveScan(self, baseRequestResponse, insertionPoint):
return None
def consolidateDuplicateIssues(self, existingIssue, newIssue):
return 0
# Register the custom scanner check with Burp Suite
callbacks = None
def registerExtenderCallbacks(this_callbacks):
global callbacks
callbacks = this_callbacks
callbacks.setExtensionName("Custom Scanner Check")
callbacks.registerScannerCheck(CustomScannerCheck())
return