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:
Bernardo Damele
2008-11-09 16:57:47 +00:00
parent 544ced52b5
commit 0c5d3df546
11 changed files with 139 additions and 80 deletions

View File

@@ -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