Skip to content

Commit a3100ff

Browse files
committed
Trivial refactoring of sqlmapproject#4657
1 parent b65c176 commit a3100ff

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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.10.10"
23+
VERSION = "1.5.10.11"
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/parse/cmdline.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,12 +1057,10 @@ def _format_action_invocation(self, action):
10571057
if args.dummy:
10581058
args.url = args.url or DUMMY_URL
10591059

1060-
args.stdinPipe = None
1061-
if hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno()) and '-' not in sys.argv:
1062-
if args.api:
1063-
logger.info("Ignoring STDIN in API mode")
1064-
else:
1065-
args.stdinPipe = iter(sys.stdin.readline, None)
1060+
if hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno()) and '-' not in sys.argv and not args.api:
1061+
args.stdinPipe = iter(sys.stdin.readline, None)
1062+
else:
1063+
args.stdinPipe = None
10661064

10671065
if not any((args.direct, args.url, args.logFile, args.bulkFile, args.googleDork, args.configFile, args.requestFile, args.updateAll, args.smokeTest, args.vulnTest, args.wizard, args.dependencies, args.purge, args.listTampers, args.hashFile, args.stdinPipe)):
10681066
errMsg = "missing a mandatory option (-d, -u, -l, -m, -r, -g, -c, --wizard, --shell, --update, --purge, --list-tampers or --dependencies). "

0 commit comments

Comments
 (0)