Created
September 18, 2017 14:47
-
-
Save pajswigger/39cdad4bc9f90c4a98e0498b93320165 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from burp import IBurpExtender, IScannerCheck, IScanIssue | |
class BurpExtender(IBurpExtender): | |
def registerExtenderCallbacks(self, callbacks): | |
callbacks.registerScannerCheck(ScanCheck(callbacks)) | |
class ScanCheck(IScannerCheck): | |
def __init__(self, callbacks): | |
self.callbacks = callbacks | |
def doPassiveScan(self, base): | |
self.callbacks.printOutput("PASSIVE!") | |
reqInfo = self.callbacks.getHelpers().analyzeRequest(base.getHttpService(), base.getRequest()) | |
return [CustomIssue(reqInfo.getUrl(), base.getHttpService())] | |
def doActiveScan(self, baseRequestResponse, insertionPoint): | |
return [] | |
def consolidateDuplicateIssues(self, existing, new): | |
self.callbacks.printOutput("Consolidate!") | |
return 1 | |
class CustomIssue(IScanIssue): | |
def __init__(self, url, httpService): | |
self.xurl = url | |
self.xhttpService = httpService | |
def getUrl(self): | |
return self.xurl | |
def getIssueName(self): | |
return "Custom issue" | |
def getIssueType(self): | |
return 0x0000 | |
def getSeverity(self): | |
return "Low" | |
def getConfidence(self): | |
return "Firm" | |
def getIssueBackground(self): | |
return "Custom issue" | |
def getRemediationBackground(self): | |
return "Panic" | |
def getIssueDetail(self): | |
return "Custom issue" | |
def getRemediationDetail(self): | |
return "Run in circles, scream and shout" | |
def getHttpMessages(self): | |
return [] | |
def getHttpService(self): | |
return self.xhttpService |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment