2020from lib .core .common import readInput
2121from lib .core .common import resetCookieJar
2222from lib .core .common import urldecode
23- from lib .core .data import cmdLineOptions
2423from lib .core .data import conf
2524from lib .core .data import kb
2625from lib .core .data import logger
26+ from lib .core .data import mergedOptions
2727from lib .core .data import paths
2828from lib .core .dicts import DBMS_DICT
2929from lib .core .dump import dumper
4747from lib .core .settings import MULTIPART_RECOGNITION_REGEX
4848from lib .core .settings import PROBLEMATIC_CUSTOM_INJECTION_PATTERNS
4949from lib .core .settings import REFERER_ALIASES
50+ from lib .core .settings import RESTORE_MERGED_OPTIONS
5051from lib .core .settings import RESULTS_FILE_FORMAT
5152from lib .core .settings import SOAP_RECOGNITION_REGEX
5253from lib .core .settings import SUPPORTED_DBMS
@@ -511,25 +512,14 @@ def _createTargetDirs():
511512 _createFilesDir ()
512513 _configureDumper ()
513514
514- def _restoreCmdLineOptions ():
515+ def _restoreMergedOptions ():
515516 """
516- Restore command line options that could be possibly
517- changed during the testing of previous target.
517+ Restore merged options ( command line, configuration file and default values)
518+ that could be possibly changed during the testing of previous target.
518519 """
519520
520- conf .col = cmdLineOptions .col
521- conf .db = cmdLineOptions .db
522- conf .dnsName = cmdLineOptions .dnsName
523- conf .privEsc = cmdLineOptions .privEsc
524- conf .tbl = cmdLineOptions .tbl
525- conf .regexp = cmdLineOptions .regexp
526- conf .string = cmdLineOptions .string
527- conf .textOnly = cmdLineOptions .textOnly
528- conf .threads = cmdLineOptions .threads
529- conf .timeSec = cmdLineOptions .timeSec
530- conf .tmpPath = cmdLineOptions .tmpPath
531- conf .uChar = cmdLineOptions .uChar
532- conf .user = cmdLineOptions .user
521+ for option in RESTORE_MERGED_OPTIONS :
522+ conf [option ] = mergedOptions [option ]
533523
534524def initTargetEnv ():
535525 """
@@ -548,7 +538,7 @@ def initTargetEnv():
548538 conf .hashDBFile = None
549539
550540 _setKnowledgeBaseAttributes (False )
551- _restoreCmdLineOptions ()
541+ _restoreMergedOptions ()
552542 _setDBMS ()
553543
554544 if conf .data :
0 commit comments