Skip to content

Commit 81228cf

Browse files
committed
fix: remove undefined resp reference in is_false_positive method
1 parent b36004c commit 81228cf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

socrates-blade.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,13 @@ def is_false_positive(self, url, param, payload):
380380
return True
381381

382382
# Already-encoded payloads that are safely escaped
383-
# If payload appears URL-encoded, it might be safely escaped
383+
# If payload appears URL-encoded, check if the decoded form is
384+
# reflected — if not, it's likely safely escaped
384385
if '%3C' in payload or '%3E' in payload or '%22' in payload:
385-
# Check if raw form is NOT in response (meaning it's escaped)
386386
decoded = unquote(payload)
387-
if decoded not in resp.text:
387+
if decoded.lower() not in url.lower() and decoded.lower() not in param.lower():
388388
return True
389-
389+
390390
return False
391391

392392
def test_xss(self, url, params, method='GET'):

0 commit comments

Comments
 (0)