Projects STRLCPY js-link-finder Commits 8dbcd7bc
🤬
  • ■ ■ ■ ■ ■ ■
    FransLinkfinder.py
    skipped 27 lines
    28 28   def run(self):
    29 29   self.runner()
    30 30   
     31 +# Needed params
     32 + 
     33 +JSExclusionList = ['jquery', 'google-analytics','gpt.js']
    31 34   
    32 35  class BurpExtender(IBurpExtender, IScannerCheck, ITab):
    33 36   def registerExtenderCallbacks(self, callbacks):
    skipped 64 lines
    98 101   def clearLog(self, event):
    99 102   self.outputTxtArea.setText("Burp JS LinkFinder loaded." + "\n" + "Copyright (c) 2019 Frans Hendrik Botes" + "\n" )
    100 103   
     104 +
    101 105   def doPassiveScan(self, ihrr):
     106 +
    102 107   try:
    103  - url = ihrr.getUrl()
     108 + urlReq = ihrr.getUrl()
     109 + testString = str(urlReq)
    104 110   linkA = linkAnalyse(ihrr,self.helpers)
    105  - if ".js" in str(url):
    106  - self.outputTxtArea.append("\n" + "[+] Valid URL found: " + str(url))
    107  - issueText = linkA.analyseURL()
    108  - for counter, issueText in enumerate(issueText):
    109  - #print("TEST Value returned SUCCESS")
    110  - self.outputTxtArea.append("\n" + "\t" + str(counter)+' - ' +issueText['link'])
     111 + # check if JS file
     112 + if ".js" in str(urlReq):
     113 + # Exclude casual JS files
     114 + if any(x in testString for x in JSExclusionList):
     115 + print("\n" + "[-] URL excluded " + str(urlReq))
     116 + else:
     117 + self.outputTxtArea.append("\n" + "[+] Valid URL found: " + str(urlReq))
     118 + issueText = linkA.analyseURL()
     119 + for counter, issueText in enumerate(issueText):
     120 + #print("TEST Value returned SUCCESS")
     121 + self.outputTxtArea.append("\n" + "\t" + str(counter)+' - ' +issueText['link'])
    111 122   
    112  - issues = ArrayList()
    113  - issues.add(SRI(ihrr, self.helpers))
    114  - return issues
     123 + issues = ArrayList()
     124 + issues.add(SRI(ihrr, self.helpers))
     125 + return issues
    115 126   except UnicodeEncodeError:
    116 127   print ("Error in URL decode.")
    117 128   return None
    skipped 152 lines
Please wait...
Page is in error, reload to recover