MCPcopy
hub / github.com/Xyntax/POC-T / scan

Function scan

lib/controller/engine.py:40–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def 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
65def run():

Callers

nothing calls this directly

Calls 5

resultHandlerFunction · 0.85
changeScanCountFunction · 0.85
printProgressFunction · 0.85
changeThreadCountFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected