MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _setHTTPTimeout

Function _setHTTPTimeout

lib/core/option.py:1548–1571  ·  view source on GitHub ↗

Set the HTTP timeout

()

Source from the content-addressed store, hash-verified

1546 raise SqlmapDataException(errMsg)
1547
1548def _setHTTPTimeout():
1549 """
1550 Set the HTTP timeout
1551 """
1552
1553 if conf.timeout:
1554 debugMsg = "setting the HTTP timeout"
1555 logger.debug(debugMsg)
1556
1557 conf.timeout = float(conf.timeout)
1558
1559 if conf.timeout < 3.0:
1560 warnMsg = "the minimum HTTP timeout is 3 seconds, sqlmap "
1561 warnMsg += "will going to reset it"
1562 logger.warning(warnMsg)
1563
1564 conf.timeout = 3.0
1565 else:
1566 conf.timeout = 30.0
1567
1568 try:
1569 socket.setdefaulttimeout(conf.timeout)
1570 except OverflowError as ex:
1571 raise SqlmapValueException("invalid value used for option '--timeout' ('%s')" % getSafeExString(ex))
1572
1573def _checkDependencies():
1574 """

Callers 1

initFunction · 0.85

Calls 3

getSafeExStringFunction · 0.90
debugMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…