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

Method dumpFoundColumn

plugins/generic/entries.py:523–588  ·  view source on GitHub ↗
(self, dbs, foundCols, colConsider)

Source from the content-addressed store, hash-verified

521 logger.info(infoMsg)
522
523 def dumpFoundColumn(self, dbs, foundCols, colConsider):
524 message = "do you want to dump found column(s) entries? [Y/n] "
525
526 if not readInput(message, default='Y', boolean=True):
527 return
528
529 dumpFromDbs = []
530 message = "which database(s)?\n[a]ll (default)\n"
531
532 for db, tblData in dbs.items():
533 if tblData:
534 message += "[%s]\n" % unsafeSQLIdentificatorNaming(db)
535
536 message += "[q]uit"
537 choice = readInput(message, default='a')
538
539 if not choice or choice in ('a', 'A'):
540 dumpFromDbs = list(dbs.keys())
541 elif choice in ('q', 'Q'):
542 return
543 else:
544 dumpFromDbs = choice.replace(" ", "").split(',')
545
546 for db, tblData in dbs.items():
547 if db not in dumpFromDbs or not tblData:
548 continue
549
550 conf.db = db
551 dumpFromTbls = []
552 message = "which table(s) of database '%s'?\n" % unsafeSQLIdentificatorNaming(db)
553 message += "[a]ll (default)\n"
554
555 for tbl in tblData:
556 message += "[%s]\n" % tbl
557
558 message += "[s]kip\n"
559 message += "[q]uit"
560 choice = readInput(message, default='a')
561
562 if not choice or choice in ('a', 'A'):
563 dumpFromTbls = tblData
564 elif choice in ('s', 'S'):
565 continue
566 elif choice in ('q', 'Q'):
567 return
568 else:
569 dumpFromTbls = choice.replace(" ", "").split(',')
570
571 for table, columns in tblData.items():
572 if table not in dumpFromTbls:
573 continue
574
575 conf.tbl = table
576 colList = [_ for _ in columns if _]
577
578 if conf.exclude:
579 colList = [_ for _ in colList if re.search(conf.exclude, _, re.I) is None]
580

Callers 2

searchColumnMethod · 0.80
searchColumnMethod · 0.80

Calls 8

dumpTableMethod · 0.95
readInputFunction · 0.90
itemsMethod · 0.80
dbTableValuesMethod · 0.80
keysMethod · 0.45
replaceMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected