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

Skip to content

Commit 5a6a01f

Browse files
committed
added socket timeout exception handling regarding that timeout message from Fahad Al Shunaiber
1 parent be81c20 commit 5a6a01f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/utils/google.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import cookielib
2626
import re
27+
import socket
2728
import urllib2
2829

2930
from lib.core.convert import urlencode
@@ -129,7 +130,7 @@ def search(self, googleDork):
129130
logger.log(8, responseMsg)
130131
except urllib2.HTTPError, e:
131132
page = e.read()
132-
except urllib2.URLError, e:
133+
except (urllib2.URLError, socket.error, socket.timeout), e:
133134
errMsg = "unable to connect to Google"
134135
raise sqlmapConnectionException, errMsg
135136

0 commit comments

Comments
 (0)