Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions FransLinkfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
from javax.swing import JTextField
from javax.swing.table import AbstractTableModel
import urlparse,threading
import urllib2
import ssl
try:
import queue
except ImportError:
Expand All @@ -51,6 +53,8 @@ def run(self):

class BurpExtender(IBurpExtender, IScannerCheck, ITab):
def registerExtenderCallbacks(self, callbacks):
# https error
ssl._create_default_https_context = ssl._create_unverified_context
self.callbacks = callbacks
self.helpers = callbacks.getHelpers()
callbacks.setExtensionName("BurpJSLinkFinderv2")
Expand Down Expand Up @@ -233,6 +237,7 @@ def doPassiveScan(self, ihrr):
urlReq = ihrr.getUrl()
testString = str(urlReq)
linkA = linkAnalyse(ihrr,self.helpers)
headers = { 'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' }
# check if JS file
if ".js" in str(urlReq):
# Exclude casual JS files
Expand All @@ -245,8 +250,13 @@ def doPassiveScan(self, ihrr):
self.outputTxtArea.append("\n" + "\t" + issueText['link'])
if linkA.valcheckUrl(issueText['link']):
fullURL = urlparse.urljoin(str(urlReq), '/') + issueText['link']

self.mapTxtArea.append("\n" + fullURL)
# check url status
try:
req = urllib2.Request(url=str(fullURL),headers=headers)
res = urllib2.urlopen(req,timeout= 600,context=ssl._create_unverified_context())
self.mapTxtArea.append("\n" + fullURL+ "\t"+"["+"code:"+str(res.code)+"]")
except Exception,e:
self.mapTxtArea.append("\n" + fullURL+ "\t"+"["+str(e)+"]")
filNam = os.path.basename(issueText['link'])
if linkA.isNotBlank((filNam)):
try:
Expand Down