()
| 38 | |
| 39 | |
| 40 | def scan(): |
| 41 | while 1: |
| 42 | if th.thread_mode: th.load_lock.acquire() |
| 43 | if th.queue.qsize() > 0 and th.is_continue: |
| 44 | payload = str(th.queue.get(timeout=1.0)) |
| 45 | if th.thread_mode: th.load_lock.release() |
| 46 | else: |
| 47 | if th.thread_mode: th.load_lock.release() |
| 48 | break |
| 49 | try: |
| 50 | # POC在执行时报错如果不被处理,线程框架会停止并退出 |
| 51 | status = th.module_obj.poc(payload) |
| 52 | resultHandler(status, payload) |
| 53 | except Exception: |
| 54 | th.errmsg = traceback.format_exc() |
| 55 | th.is_continue = False |
| 56 | changeScanCount(1) |
| 57 | if th.s_flag: |
| 58 | printProgress() |
| 59 | if th.s_flag: |
| 60 | printProgress() |
| 61 | |
| 62 | changeThreadCount(-1) |
| 63 | |
| 64 | |
| 65 | def run(): |
nothing calls this directly
no test coverage detected