Skip to content

Commit

Permalink
Fine-tuning for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stamparm committed Sep 29, 2021
1 parent 1d6d2c1 commit a9f9982
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/core/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def retrieve():
conf.googlePage += 1

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

Expand Down
2 changes: 1 addition & 1 deletion lib/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from thirdparty.six import unichr as _unichr

# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.5.9.12"
VERSION = "1.5.9.13"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
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)
Expand Down
3 changes: 2 additions & 1 deletion lib/core/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _thread():
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)

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

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

output = shellExec(cmd)

Expand Down
3 changes: 3 additions & 0 deletions lib/parse/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ def cmdLineParser(argv=None):
parser.add_argument("--non-interactive", dest="nonInteractive", action="store_true",
help=SUPPRESS)

parser.add_argument("--testing", dest="testing", action="store_true",
help=SUPPRESS)

parser.add_argument("--gui", dest="gui", action="store_true",
help=SUPPRESS)

Expand Down

0 comments on commit a9f9982

Please sign in to comment.