Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 034a3f3

Browse files
committed
Minor improvement when testing for UNION query SQL injection to check only without comment and with DBMS specific comment (not anymore "random" unspecific comment characters)
1 parent 3cf1658 commit 034a3f3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/techniques/inband/union/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from lib.core.data import conf
2929
from lib.core.data import kb
3030
from lib.core.data import logger
31+
from lib.core.data import queries
3132
from lib.core.session import setUnion
3233
from lib.request.connect import Connect as Request
3334

@@ -94,7 +95,7 @@ def unionTest():
9495

9596
query = agent.prefixQuery(" UNION ALL SELECT NULL")
9697

97-
for comment in ("--", "#", "/*", ";", "%00"):
98+
for comment in ("", queries[kb.dbms].comment):
9899
value = __effectiveUnionTest(query, comment)
99100

100101
if value:

0 commit comments

Comments
 (0)