mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
sqlmap 0.6.3-rc1:
* Minor enhancement to be able to specify the number of seconds to wait between each HTTP request. * Minor bug fix to handle session.error and session.timeout in HTTP requests. * Updated documentation.
This commit is contained in:
@@ -26,6 +26,8 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import md5
|
||||
import re
|
||||
import socket
|
||||
import time
|
||||
import urllib2
|
||||
import urlparse
|
||||
|
||||
@@ -156,7 +158,7 @@ class Connect:
|
||||
status = e.msg
|
||||
responseHeaders = e.info()
|
||||
|
||||
except urllib2.URLError, e:
|
||||
except (urllib2.URLError, socket.error), _:
|
||||
warnMsg = "unable to connect to the target url"
|
||||
|
||||
if conf.googleDork:
|
||||
@@ -168,6 +170,18 @@ class Connect:
|
||||
warnMsg += " or proxy"
|
||||
raise sqlmapConnectionException, warnMsg
|
||||
|
||||
except socket.timeout, _:
|
||||
warnMsg = "connection timed out to the target url"
|
||||
|
||||
if conf.googleDork:
|
||||
warnMsg += ", skipping to next url"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return None
|
||||
else:
|
||||
warnMsg += " or proxy"
|
||||
raise sqlmapConnectionException, warnMsg
|
||||
|
||||
parsePage(page)
|
||||
responseMsg += "(%s - %d):\n" % (status, code)
|
||||
|
||||
@@ -178,6 +192,9 @@ class Connect:
|
||||
|
||||
logger.log(8, responseMsg)
|
||||
|
||||
if conf.delay != None and isinstance(conf.delay, (int, float)) and conf.delay > 0:
|
||||
time.sleep(conf.delay)
|
||||
|
||||
return page
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user