From 5a6a01f24ce06fea4467cf1030093ef554042189 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 26 Mar 2010 11:51:23 +0000 Subject: [PATCH] added socket timeout exception handling regarding that timeout message from Fahad Al Shunaiber --- lib/utils/google.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/google.py b/lib/utils/google.py index 1c4671700..efb72af62 100644 --- a/lib/utils/google.py +++ b/lib/utils/google.py @@ -24,6 +24,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import cookielib import re +import socket import urllib2 from lib.core.convert import urlencode @@ -129,7 +130,7 @@ class Google: logger.log(8, responseMsg) except urllib2.HTTPError, e: page = e.read() - except urllib2.URLError, e: + except (urllib2.URLError, socket.error, socket.timeout), e: errMsg = "unable to connect to Google" raise sqlmapConnectionException, errMsg