mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
Adding faketty for Github Actions
This commit is contained in:
parent
94706bd7fc
commit
353a6251dd
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -13,6 +13,8 @@ jobs:
|
||||||
python-version: [ '2.x', '3.x', 'pypy-2.7', 'pypy-3.6', 'pypy-3.7' ]
|
python-version: [ '2.x', '3.x', 'pypy-2.7', 'pypy-3.6', 'pypy-3.7' ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: faketty
|
||||||
|
uses: Yuri6037/Action-FakeTTY@v1.1
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -20,7 +20,7 @@ from thirdparty import six
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.5.9.14"
|
VERSION = "1.5.9.15"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -143,7 +143,7 @@ def vulnTest():
|
||||||
for tag, value in (("<url>", url), ("<base>", base), ("<direct>", direct), ("<tmpdir>", tmpdir), ("<request>", request), ("<log>", log), ("<multiple>", multiple), ("<config>", config), ("<base64>", url.replace("id=1", "id=MZ=%3d"))):
|
for tag, value in (("<url>", url), ("<base>", base), ("<direct>", direct), ("<tmpdir>", tmpdir), ("<request>", request), ("<log>", log), ("<multiple>", multiple), ("<config>", config), ("<base64>", url.replace("id=1", "id=MZ=%3d"))):
|
||||||
options = options.replace(tag, value)
|
options = options.replace(tag, value)
|
||||||
|
|
||||||
cmd = "%s \"%s\" %s --batch --non-interactive --testing --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options)
|
cmd = "%s \"%s\" %s --batch --non-interactive --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options)
|
||||||
|
|
||||||
if "<tmpfile>" in cmd:
|
if "<tmpfile>" in cmd:
|
||||||
handle, tmp = tempfile.mkstemp()
|
handle, tmp = tempfile.mkstemp()
|
||||||
|
@ -153,7 +153,6 @@ def vulnTest():
|
||||||
if "<piped>" in cmd:
|
if "<piped>" in cmd:
|
||||||
cmd = re.sub(r"<piped>\s*", "", cmd)
|
cmd = re.sub(r"<piped>\s*", "", cmd)
|
||||||
cmd = "echo %s | %s" % (url, cmd)
|
cmd = "echo %s | %s" % (url, cmd)
|
||||||
cmd = cmd.replace("--testing ", "")
|
|
||||||
|
|
||||||
output = shellExec(cmd)
|
output = shellExec(cmd)
|
||||||
|
|
||||||
|
|
|
@ -815,9 +815,6 @@ def cmdLineParser(argv=None):
|
||||||
parser.add_argument("--non-interactive", dest="nonInteractive", action="store_true",
|
parser.add_argument("--non-interactive", dest="nonInteractive", action="store_true",
|
||||||
help=SUPPRESS)
|
help=SUPPRESS)
|
||||||
|
|
||||||
parser.add_argument("--testing", dest="testing", action="store_true",
|
|
||||||
help=SUPPRESS)
|
|
||||||
|
|
||||||
parser.add_argument("--gui", dest="gui", action="store_true",
|
parser.add_argument("--gui", dest="gui", action="store_true",
|
||||||
help=SUPPRESS)
|
help=SUPPRESS)
|
||||||
|
|
||||||
|
@ -1063,7 +1060,7 @@ def cmdLineParser(argv=None):
|
||||||
if args.dummy:
|
if args.dummy:
|
||||||
args.url = args.url or DUMMY_URL
|
args.url = args.url or DUMMY_URL
|
||||||
|
|
||||||
if hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno()) and '-' not in sys.argv and "--testing" not in sys.argv:
|
if hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno()) and '-' not in sys.argv:
|
||||||
args.stdinPipe = iter(sys.stdin.readline, None)
|
args.stdinPipe = iter(sys.stdin.readline, None)
|
||||||
else:
|
else:
|
||||||
args.stdinPipe = None
|
args.stdinPipe = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user