mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-04 05:39:02 +00:00
Baby steps (2 to 3 at a time)
This commit is contained in:
@@ -128,7 +128,7 @@ def main(src, dst):
|
||||
try:
|
||||
# Send it to the target host
|
||||
sock.sendto(ip.get_packet(), (dst, 0))
|
||||
except socket.error, ex:
|
||||
except socket.error as ex:
|
||||
sys.stderr.write("'%s'\n" % ex)
|
||||
sys.stderr.flush()
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def get_page(get=None, url=None, host=None, data=None):
|
||||
conn = urllib2.urlopen(req, timeout=TIMEOUT)
|
||||
page = conn.read()
|
||||
headers = conn.info()
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
code = getattr(ex, "code", None)
|
||||
page = ex.read() if hasattr(ex, "read") else getattr(ex, "msg", "")
|
||||
headers = ex.info() if hasattr(ex, "info") else {}
|
||||
|
||||
Reference in New Issue
Block a user