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

Function _finalize

lib/utils/hash.py:594–627  ·  view source on GitHub ↗
(retVal, results, processes, attack_info=None)

Source from the content-addressed store, hash-verified

592}
593
594def _finalize(retVal, results, processes, attack_info=None):
595 if _multiprocessing:
596 gc.enable()
597
598 # NOTE: https://github.com/sqlmapproject/sqlmap/issues/4367
599 # NOTE: https://dzone.com/articles/python-101-creating-multiple-processes
600 for process in processes:
601 try:
602 process.terminate()
603 process.join()
604 except (OSError, AttributeError):
605 pass
606
607 if retVal:
608 removals = set()
609
610 if conf.hashDB:
611 conf.hashDB.beginTransaction()
612
613 while not retVal.empty():
614 user, hash_, word = item = retVal.get(block=False)
615 results.append(item)
616 removals.add((user, hash_))
617 hashDBWrite(hash_, word)
618
619 for item in attack_info or []:
620 if (item[0][0], item[0][1]) in removals:
621 attack_info.remove(item)
622
623 if conf.hashDB:
624 conf.hashDB.endTransaction()
625
626 if hasattr(retVal, "close"):
627 retVal.close()
628
629def storeHashesToFile(attack_dict):
630 if not attack_dict:

Callers 1

dictionaryAttackFunction · 0.85

Calls 8

hashDBWriteFunction · 0.90
removeMethod · 0.80
beginTransactionMethod · 0.45
getMethod · 0.45
appendMethod · 0.45
addMethod · 0.45
endTransactionMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…