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

Function _setBulkMultipleTargets

lib/core/option.py:457–482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

455 kb.targets = _()
456
457def _setBulkMultipleTargets():
458 if not conf.bulkFile:
459 return
460
461 conf.bulkFile = safeExpandUser(conf.bulkFile)
462
463 infoMsg = "parsing multiple targets list from '%s'" % conf.bulkFile
464 logger.info(infoMsg)
465
466 if not checkFile(conf.bulkFile, False):
467 errMsg = "the specified bulk file "
468 errMsg += "does not exist"
469 raise SqlmapFilePathException(errMsg)
470
471 found = False
472 for line in getFileItems(conf.bulkFile):
473 if conf.scope and not re.search(conf.scope, line, re.I):
474 continue
475
476 if re.match(r"[^ ]+\?(.+)", line, re.I) or kb.customInjectionMark in line or conf.data:
477 found = True
478 kb.targets.add((line.strip(), conf.method, conf.data, conf.cookie, None))
479
480 if not found and not conf.forms and not conf.crawlDepth:
481 warnMsg = "no usable links found (with GET parameters)"
482 logger.warning(warnMsg)
483
484def _findPageForms():
485 if not conf.forms or conf.crawlDepth:

Callers 1

initFunction · 0.85

Calls 8

safeExpandUserFunction · 0.90
checkFileFunction · 0.90
getFileItemsFunction · 0.90
infoMethod · 0.80
searchMethod · 0.45
matchMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…