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

Skip to content

Commit cb5dc41

Browse files
committed
Bug fix for metasploit (EINTR should be ignored)
1 parent 585ebca commit cb5dc41

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty import six
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.5.14"
21+
VERSION = "1.3.5.15"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/takeover/metasploit.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import print_function
99

10+
import errno
1011
import os
1112
import re
1213
import select
@@ -595,7 +596,13 @@ def _controlMsfCmd(self, proc, func):
595596
else:
596597
proc.kill()
597598

598-
except (EOFError, IOError, select.error):
599+
except select.error as ex:
600+
# Reference: https://github.com/andymccurdy/redis-py/pull/743/commits/2b59b25bb08ea09e98aede1b1f23a270fc085a9f
601+
if ex[0] == errno.EINTR:
602+
continue
603+
else:
604+
return proc.returncode
605+
except (EOFError, IOError):
599606
return proc.returncode
600607
except KeyboardInterrupt:
601608
pass

0 commit comments

Comments
 (0)