(retVal, results, processes, attack_info=None)
| 592 | } |
| 593 | |
| 594 | def _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 | |
| 629 | def storeHashesToFile(attack_dict): |
| 630 | if not attack_dict: |
no test coverage detected
searching dependent graphs…