Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Commit

Permalink
Extra docblocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tijme Gommers committed May 24, 2018
1 parent a40c0aa commit fc5e685
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extension/Extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def burpThreadLooper(self):
self.shouldRefreshInterface = False
Platform.runLater(ExtensionRunnable(self.refreshInterfaceFunc))

threading.Timer(0.5, self.burpThreadLooper).start()
threading.Timer(1.0, self.burpThreadLooper).start()

def loadConfigFromJson(self):
"""Start loading config from JSON in the main thread."""
Expand Down
2 changes: 1 addition & 1 deletion extension/GraphWave.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def getMatchingPoints(self, response, properties):
stylometry_value = 0

for response_in_graph in self.responses():
similarity = response.getSimilarity(response_in_graph, response.url)
similarity = response.getSimilarity(response_in_graph)
if similarity > self.options["mst"]:
stylometry_count += 1
stylometry_value += similarity
Expand Down
9 changes: 5 additions & 4 deletions extension/GraphWaveHttpListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,21 @@ def processHttpMessage(self, toolFlag, messageIsRequest, requestResponse):
response = self._helpers.analyzeResponse(requestResponse.getResponse())
html = self._helpers.bytesToString(requestResponse.getResponse())

# self._lock.acquire()

if self.shouldContinueWithMessage(request, response, html):
response = GraphWaveResponse(request.getUrl().toString(), html)

if self._graph.addResponse(response) == False:
# self._lock.acquire()
response_was_added = self._graph.addResponse(response)
# self._lock.release()

if response_was_added == False:
self._config.exclude(request.getUrl().toString())
else:
self._config.include(request.getUrl().toString())
else:
self._config.include(request.getUrl().toString())

self._refreshInterface()
# self._lock.release()

def shouldContinueWithMessage(self, request, response, html):
"""Check if a message could be ignored. A message can't be ignored if
Expand Down
2 changes: 1 addition & 1 deletion extension/GraphWaveResponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __ne__(self, other):

return str(self) != str(other)

def getSimilarity(self, other, url):
def getSimilarity(self, other):
"""Check if the given response is similar to this response.
Returns:
Expand Down

0 comments on commit fc5e685

Please sign in to comment.