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

Skip to content

Commit a9f9982

Browse files
committed
Fine-tuning for Github Actions
1 parent 1d6d2c1 commit a9f9982

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def retrieve():
416416
conf.googlePage += 1
417417

418418
def _setStdinPipeTargets():
419-
if isinstance(conf.stdinPipe, _collections.Iterable):
419+
if isinstance(conf.stdinPipe, _collections.Iterable) and not conf.testing:
420420
infoMsg = "using 'STDIN' for parsing targets list"
421421
logger.info(infoMsg)
422422

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

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

lib/core/testing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _thread():
143143
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"))):
144144
options = options.replace(tag, value)
145145

146-
cmd = "%s \"%s\" %s --batch --non-interactive --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options)
146+
cmd = "%s \"%s\" %s --batch --non-interactive --testing --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options)
147147

148148
if "<tmpfile>" in cmd:
149149
handle, tmp = tempfile.mkstemp()
@@ -153,6 +153,7 @@ def _thread():
153153
if "<piped>" in cmd:
154154
cmd = re.sub(r"<piped>\s*", "", cmd)
155155
cmd = "echo %s | %s" % (url, cmd)
156+
cmd = cmd.replace("--testing ", "")
156157

157158
output = shellExec(cmd)
158159

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,9 @@ def cmdLineParser(argv=None):
815815
parser.add_argument("--non-interactive", dest="nonInteractive", action="store_true",
816816
help=SUPPRESS)
817817

818+
parser.add_argument("--testing", dest="testing", action="store_true",
819+
help=SUPPRESS)
820+
818821
parser.add_argument("--gui", dest="gui", action="store_true",
819822
help=SUPPRESS)
820823

0 commit comments

Comments
 (0)