From 5d09f7b85f1788ca847c0f3943cd5c2b3c488675 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 6 May 2016 10:32:16 +0200 Subject: [PATCH] Fixes #1822 --- lib/core/settings.py | 2 +- lib/takeover/metasploit.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index e01be12a3..a0dfd1fec 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.5.13" +VERSION = "1.0.5.14" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev") diff --git a/lib/takeover/metasploit.py b/lib/takeover/metasploit.py index 845405836..ec89b515b 100644 --- a/lib/takeover/metasploit.py +++ b/lib/takeover/metasploit.py @@ -7,6 +7,7 @@ See the file 'doc/COPYING' for copying permission import os import re +import select import sys import tempfile import time @@ -47,8 +48,6 @@ from lib.core.subprocessng import recv_some if IS_WIN: import msvcrt -else: - from select import select class Metasploit: """ @@ -550,7 +549,7 @@ class Metasploit: # Probably the child has exited pass else: - ready_fds = select([stdin_fd], [], [], 1) + ready_fds = select.select([stdin_fd], [], [], 1) if stdin_fd in ready_fds[0]: try: @@ -598,7 +597,7 @@ class Metasploit: else: proc.kill() - except (EOFError, IOError): + except (EOFError, IOError, select.error): return proc.returncode def createMsfShellcode(self, exitfunc, format, extra, encode):