MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / setOs

Method setOs

lib/core/common.py:418–445  ·  view source on GitHub ↗
(os)

Source from the content-addressed store, hash-verified

416
417 @staticmethod
418 def setOs(os):
419 if os is None:
420 return None
421
422 # Little precaution, in theory this condition should always be false
423 elif kb.os is not None and isinstance(os, six.string_types) and kb.os.lower() != os.lower():
424 msg = "sqlmap previously fingerprinted back-end DBMS "
425 msg += "operating system %s. However now it has " % kb.os
426 msg += "been fingerprinted to be %s. " % os
427 msg += "Please, specify which OS is "
428 msg += "correct [%s (default)/%s] " % (kb.os, os)
429
430 while True:
431 choice = readInput(msg, default=kb.os)
432
433 if choice == kb.os:
434 break
435 elif choice == os:
436 kb.os = choice.capitalize()
437 break
438 else:
439 warnMsg = "invalid value"
440 logger.warning(warnMsg)
441
442 elif kb.os is None and isinstance(os, six.string_types):
443 kb.os = os.capitalize()
444
445 return kb.os
446
447 @staticmethod
448 def setOsVersion(version):

Callers 13

checkSqlInjectionFunction · 0.80
_setOSFunction · 0.80
_resumeOSFunction · 0.80
setOsFunction · 0.80
getRemoteTempPathMethod · 0.80
userChooseDbmsOsMethod · 0.80
checkDbmsOsMethod · 0.80
checkDbmsMethod · 0.80
checkDbmsMethod · 0.80
checkDbmsOsMethod · 0.80
udfSetRemotePathMethod · 0.80
checkDbmsOsMethod · 0.80

Calls 2

capitalizeMethod · 0.80
readInputFunction · 0.70

Tested by

no test coverage detected