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

Method regDel

plugins/generic/takeover.py:447–481  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

445 self.addRegKey(regKey, regVal, regType, regData)
446
447 def regDel(self):
448 self._regInit()
449
450 errMsg = "missing mandatory option"
451
452 if not conf.regKey:
453 msg = "which registry key do you want to delete? "
454 regKey = readInput(msg)
455
456 if not regKey:
457 raise SqlmapMissingMandatoryOptionException(errMsg)
458 else:
459 regKey = conf.regKey
460
461 if not conf.regVal:
462 msg = "which registry key value do you want to delete? "
463 regVal = readInput(msg)
464
465 if not regVal:
466 raise SqlmapMissingMandatoryOptionException(errMsg)
467 else:
468 regVal = conf.regVal
469
470 message = "are you sure that you want to delete the Windows "
471 message += "registry path '%s\\%s? [y/N] " % (regKey, regVal)
472
473 if not readInput(message, default='N', boolean=True):
474 return
475
476 infoMsg = "deleting Windows registry path '%s\\%s'. " % (regKey, regVal)
477 infoMsg += "This will work only if the user running the database "
478 infoMsg += "process has privileges to modify the Windows registry."
479 logger.info(infoMsg)
480
481 self.delRegKey(regKey, regVal)

Callers 1

actionFunction · 0.80

Calls 5

_regInitMethod · 0.95
readInputFunction · 0.90
infoMethod · 0.80
delRegKeyMethod · 0.80

Tested by

no test coverage detected