{"id":115784,"date":"2026-10-13T11:25:05","date_gmt":"2026-10-13T03:25:05","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115784.html"},"modified":"2026-10-13T11:25:05","modified_gmt":"2026-10-13T03:25:05","slug":"empire-%e6%a1%86%e6%9e%b6%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%97%a5%e5%bf%97%e4%bd%93%e7%b3%bb%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97%ef%bc%9a%e6%97%a5%e5%bf%97%e7%ba%a7%e5%88%ab%e3%80%81listener-%e7%8b%ac","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115784.html","title":{"rendered":"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3"},"content":{"rendered":"<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u6e17\u900f\u6d4b\u8bd5<\/span><\/li>\n<li><span class=\"gcb-tag\">\u7f51\u7edc\u5b89\u5168<\/span><\/li>\n<li><span class=\"gcb-tag\">\u5e94\u7528\u5b89\u5168<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011Empire<\/h3>\n<p class=\"gcb-project-desc\">Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/empi\/Empire<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<p>Empire \u4f5c\u4e3a\u4e00\u6b3e\u540e\u6e17\u900f\u4e0e\u5bf9\u6297\u6a21\u62df&#xff08;adversary emulation&#xff09;\u6846\u67b6&#xff0c;\u5176\u670d\u52a1\u5668\u7aef\u65e5\u5fd7\u4f53\u7cfb\u627f\u62c5\u7740\u8fd0\u884c\u72b6\u6001\u8ffd\u8e2a\u3001Listener \u901a\u4fe1\u5ba1\u8ba1\u4e0e\u6392\u9519\u5b9a\u4f4d\u7684\u5173\u952e\u804c\u8d23\u3002\u672c\u6587\u4ee5 docs\/settings\/logging.md \u4e3a\u6838\u5fc3&#xff0c;\u7ed3\u5408\u4ed3\u5e93\u5185\u914d\u7f6e\u4e0e\u6e90\u7801\u5b9e\u73b0&#xff08;log_util.py\u3001config.yaml\u3001arguments.py&#xff09;&#xff0c;\u7cfb\u7edf\u8bb2\u89e3\u670d\u52a1\u5668\u65e5\u5fd7\u4e0e Listener \u65e5\u5fd7\u7684\u843d\u76d8\u8def\u5f84\u3001\u7ea7\u522b\u63a7\u5236\u3001\u683c\u5f0f\u5316\u89c4\u5219\u3001\u914d\u7f6e\u6587\u4ef6\u5b57\u6bb5\u4e0e\u547d\u4ee4\u884c\u53c2\u6570&#xff0c;\u5e76\u7ed9\u51fa\u53ef\u590d\u5236\u7684\u6392\u67e5\u4e0e\u8c03\u4f18\u65b9\u6848\u3002\u8bfb\u5b8c\u672c\u6587&#xff0c;\u4f60\u5c06\u80fd\u72ec\u7acb\u5b8c\u6210 Empire \u65e5\u5fd7\u7ea7\u522b\u7684\u52a8\u6001\u8c03\u6574\u3001\u63a7\u5236\u53f0\u683c\u5f0f\u5207\u6362\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u7684\u8bfb\u5199\u4ee5\u53ca&#034;\u6700\u540e\u4efb\u52a1\u8f93\u5165&#034;\u8c03\u8bd5\u5f00\u5173\u7684\u914d\u7f6e\u3002<\/p>\n<h3>\u65e5\u5fd7\u4f53\u7cfb\u603b\u89c8&#xff1a;\u53cc\u901a\u9053\u8f93\u51fa\u6a21\u578b<\/h3>\n<p>Empire \u670d\u52a1\u5668\u91c7\u7528\u6587\u4ef6 &#043; \u63a7\u5236\u53f0\u53cc\u901a\u9053\u7684\u65e5\u5fd7\u8f93\u51fa\u6a21\u578b&#xff1a;\u6240\u6709\u65e5\u5fd7\u540c\u65f6\u5199\u5165\u78c1\u76d8\u6587\u4ef6\u4e0e\u63a7\u5236\u53f0&#xff08;\u7ec8\u7aef&#xff09;\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\u670d\u52a1\u5668\u65e5\u5fd7\u6587\u4ef6&#xff1a;~\/.local\/share\/empire\/logs\/empire_server.log<\/li>\n<li>\u63a7\u5236\u53f0\u8f93\u51fa&#xff1a;\u8ddf\u968f\u65e5\u5fd7\u7ea7\u522b\u8fc7\u6ee4&#xff08;\u9ed8\u8ba4 INFO&#xff09;<\/li>\n<\/ul>\n<p>\u4ece\u6e90\u7801\u770b&#xff0c;\u65e5\u5fd7\u6839\u76ee\u5f55\u7531 config_manager.py \u4e2d\u7684 DATA_DIR \u51b3\u5b9a&#xff0c;\u5373 ~\/.local\/share\/empire&#xff08;\u6d4b\u8bd5\u6a21\u5f0f\u4e0b\u4e3a ~\/.local\/share\/empire-test&#xff09;&#xff0c;log_util.py \u4e2d\u7684 get_log_dir() \u5728\u5176\u4e0b\u521b\u5efa logs\/ \u5b50\u76ee\u5f55&#xff1a;<\/p>\n<p>def get_log_dir():<br \/>\n    log_dir &#061; config_manager.DATA_DIR \/ &#034;logs&#034;<br \/>\n    log_dir.mkdir(parents&#061;True, exist_ok&#061;True)<br \/>\n    return log_dir<\/p>\n<p>setup_logging() \u5728\u670d\u52a1\u5668\u542f\u52a8\u6d41\u7a0b server.py \u7684 run() \u4e2d\u4e8e\u542f\u52a8\u65e9\u671f\u88ab\u8c03\u7528&#xff0c;\u5b8c\u6210 root logger \u7684\u521d\u59cb\u5316\u3002<\/p>\n<h3>Listener \u72ec\u7acb\u65e5\u5fd7&#xff1a;\u6bcf\u4e2a\u76d1\u542c\u5668\u4e00\u4e2a\u6587\u4ef6<\/h3>\n<p>Listener&#xff08;\u76d1\u542c\u5668&#xff09;\u62e5\u6709\u72ec\u7acb\u7684\u65e5\u5fd7\u914d\u7f6e&#xff0c;\u4e0e\u670d\u52a1\u5668 root \u65e5\u5fd7\u5206\u79bb&#xff1a;<\/p>\n<ul>\n<li>\u6587\u4ef6\u8f93\u51fa&#xff1a;\u6240\u6709 DEBUG \u53ca\u4ee5\u4e0a\u7ea7\u522b\u7684\u65e5\u5fd7\u5199\u5165 ~\/.local\/share\/empire\/logs\/listener_&lt;listener_name&gt;.log<\/li>\n<li>\u63a7\u5236\u53f0\u8f93\u51fa&#xff1a;\u6240\u6709 WARNING \u53ca\u4ee5\u4e0a\u7ea7\u522b\u7684\u65e5\u5fd7\u6253\u5370\u5230\u63a7\u5236\u53f0<\/li>\n<\/ul>\n<p>\u5373&#xff1a;\u6587\u4ef6\u8bb0\u5f55\u5b8c\u6574\u660e\u7ec6&#xff08;\u542b debug&#xff09;&#xff0c;\u63a7\u5236\u53f0\u53ea\u5448\u73b0\u544a\u8b66\u4e0e\u9519\u8bef&#xff0c;\u907f\u514d\u9ad8\u9891 agent \u5fc3\u8df3\u4fe1\u606f\u6df9\u6ca1\u7ec8\u7aef\u3002<\/p>\n<h4>\u5982\u4f55\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528 Listener \u65e5\u5fd7<\/h4>\n<p>\u82e5\u5e0c\u671b\u67d0\u6761\u6d88\u606f\u8fdb\u5165 Listener \u4e13\u5c5e\u65e5\u5fd7&#xff0c;\u8bf7\u4f7f\u7528 self.instance_log&#xff1b;\u82e5\u5e0c\u671b\u6d88\u606f\u540c\u65f6\u51fa\u73b0\u5728\u670d\u52a1\u5668\u65e5\u5fd7\u6587\u4ef6\u4e0e\u63a7\u5236\u53f0&#xff0c;\u5219\u8fd8\u9700\u989d\u5916\u8c03\u7528\u6a21\u5757\u7ea7 logger \u7684 log.info()\u3002\u4ee5 http \u76d1\u542c\u5668\u4e3a\u4f8b&#xff0c;\u5b98\u65b9\u63a8\u8350\u5199\u6cd5\u4e3a&#xff1a;<\/p>\n<p>self.instance_log.info()<\/p>\n<p>\u4ece\u6e90\u7801\u770b&#xff0c;instance_log \u7684\u521d\u59cb\u5316\u53d1\u751f\u5728\u76d1\u542c\u5668\u542f\u52a8\u9636\u6bb5\u3002\u4ee5 http.py \u4e3a\u4f8b&#xff0c;start_server() \u4e2d\u901a\u8fc7 get_listener_logger() \u6309\u76d1\u542c\u5668\u540d\u79f0\u521b\u5efa\u72ec\u7acb logger&#xff1a;<\/p>\n<p>self.instance_log &#061; log_util.get_listener_logger(<br \/>\n    LOG_NAME_PREFIX, self.options[&#034;Name&#034;][&#034;Value&#034;]<br \/>\n)<\/p>\n<p>\u5176\u4e2d LOG_NAME_PREFIX &#061; __name__&#xff08;\u5373 empire.server.listeners.http&#xff09;&#xff0c;logger \u540d\u79f0\u5f62\u5982 empire.server.listeners.http.&lt;listener_name&gt;\u3002http_foreign\u3001http_hop\u3001http_malleable\u3001port_forward_pivot\u3001smb \u7b49\u76d1\u542c\u5668\u5b9e\u73b0\u540c\u6837\u9075\u5faa\u8be5\u6a21\u5f0f\u3002<\/p>\n<p>get_listener_logger()&#xff08;log_util.py&#xff09;\u7684\u6838\u5fc3\u5b9e\u73b0\u8981\u70b9&#xff1a;<\/p>\n<p>log &#061; logging.getLogger(f&#034;{log_name_prefix}.{listener_name}&#034;)<br \/>\n# return if already initialized<br \/>\nif log.handlers:<br \/>\n    return log<br \/>\nlog.propagate &#061; False<\/p>\n<p>log_dir &#061; get_log_dir()<br \/>\nlog_file &#061; log_dir \/ f&#034;listener_{listener_name}.log&#034;<\/p>\n<p>listener_log_file_handler &#061; logging.FileHandler(log_file)<br \/>\nlistener_log_file_handler.setLevel(logging.DEBUG)   # \u6587\u4ef6\u7aef\u8bb0\u5f55 DEBUG \u53ca\u4ee5\u4e0a<br \/>\n&#8230;<br \/>\nlistener_stream_handler &#061; logging.StreamHandler()<br \/>\nlistener_stream_handler.setLevel(logging.WARNING)   # \u63a7\u5236\u53f0\u7aef\u4ec5 WARNING \u53ca\u4ee5\u4e0a<\/p>\n<p>\u6ce8\u610f\u4e24\u70b9\u5b9e\u73b0\u7ec6\u8282&#xff1a;<\/p>\n<li>\u5e42\u7b49\u521d\u59cb\u5316&#xff1a;logger \u5df2\u6709 handler \u65f6\u76f4\u63a5\u8fd4\u56de&#xff0c;\u907f\u514d\u91cd\u590d\u6dfb\u52a0\u6587\u4ef6\/\u63a7\u5236\u53f0 handler\u3002<\/li>\n<li>log.propagate &#061; False&#xff1a;\u7981\u6b62 Listener \u65e5\u5fd7\u5411\u4e0a\u4f20\u64ad\u5230 root logger&#xff0c;\u4ece\u800c\u5b9e\u73b0\u4e0e\u670d\u52a1\u5668\u65e5\u5fd7\u7684\u9694\u79bb\u3002<\/li>\n<p>\u53e6\u5916&#xff0c;http.py \u4e2d\u8fd8\u4f1a\u5c06 Flask \u5185\u7f6e\u7684 werkzeug logger \u7ea7\u522b\u538b\u5236\u5230 ERROR&#xff0c;\u4ee5\u51cf\u5c11 Web \u6846\u67b6\u566a\u97f3\u5237\u5c4f\u3002<\/p>\n<h4>\u670d\u52a1\u5668\u65e5\u5fd7\u4e0e Listener \u65e5\u5fd7\u7684\u534f\u540c<\/h4>\n<p>\u5b9e\u9645\u4ee3\u7801\u4e2d\u5e38\u91c7\u7528&#034;\u53cc\u5199&#034;\u7b56\u7565&#xff1a;\u4f8b\u5982 http.py \u4e2d\u5728\u4efb\u52a1\u5904\u7406\u7684\u5173\u952e\u8def\u5f84\u4e0a\u5148\u5199 self.instance_log.info(message) \u518d\u5199 log.info(message)&#xff0c;\u524d\u8005\u8fdb\u5165 listener_&lt;name&gt;.log&#xff0c;\u540e\u8005\u8fdb\u5165\u670d\u52a1\u5668\u65e5\u5fd7\u4e0e\u63a7\u5236\u53f0\u3002\u8fd9\u4e5f\u662f\u5b98\u65b9\u6587\u6863&#034;\u82e5\u5e0c\u671b\u6d88\u606f\u540c\u65f6\u8fdb\u5165\u670d\u52a1\u5668\u65e5\u5fd7\u4e0e\u63a7\u5236\u53f0&#xff0c;\u5c31\u989d\u5916\u8c03\u7528 log.info()&#034;\u5efa\u8bae\u7684\u5177\u4f53\u843d\u5730\u65b9\u5f0f\u3002<\/p>\n<h3>\u683c\u5f0f\u5316\u5668&#xff1a;Simple \u4e0e Expanded \u4e24\u79cd\u683c\u5f0f<\/h3>\n<p>\u65e5\u5fd7\u683c\u5f0f\u7531 log_util.py \u4e2d\u5b9a\u4e49\u7684\u4e24\u4e2a\u5e38\u91cf\u51b3\u5b9a&#xff1a;<\/p>\n<p>LOG_FORMAT &#061; &#034;%(asctime)s [%(filename)s:%(lineno)d] [%(levelname)s]: %(message)s &#034;<br \/>\nSIMPLE_LOG_FORMAT &#061; &#034;[%(levelname)s]: %(message)s &#034;<\/p>\n<table>\n<tr>\u683c\u5f0f\u5185\u5bb9\u5e94\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>Simple&#xff08;\u7b80\u5355\u683c\u5f0f&#xff09;<\/td>\n<td>\u4ec5\u65e5\u5fd7\u7ea7\u522b &#043; \u6d88\u606f<\/td>\n<td>\u63a7\u5236\u53f0\u9ed8\u8ba4\u683c\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>Expanded&#xff08;\u6269\u5c55\u683c\u5f0f&#xff09;<\/td>\n<td>\u65f6\u95f4\u6233 &#043; \u89e6\u53d1\u65e5\u5fd7\u7684\u6e90\u7801\u6587\u4ef6\u4e0e\u884c\u53f7 &#043; \u7ea7\u522b &#043; \u6d88\u606f<\/td>\n<td>\u670d\u52a1\u5668\u65e5\u5fd7\u6587\u4ef6&#xff1b;\u53ef\u901a\u8fc7 logging.simple_console \u542f\u7528\u4e3a\u63a7\u5236\u53f0\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u63a7\u5236\u53f0\u8f93\u51fa\u8fd8\u7ecf\u8fc7 ColorFormatter \u6309\u7ea7\u522b\u7740\u8272&#xff1a;DEBUG \u7070\u8272\u3001INFO \u84dd\u8272\u3001WARNING \u9ec4\u8272\u3001ERROR\/CRITICAL \u7ea2\u8272&#xff0c;\u4fbf\u4e8e\u5728\u7ec8\u7aef\u4e2d\u5feb\u901f\u533a\u5206\u65e5\u5fd7\u4e25\u91cd\u7a0b\u5ea6\u3002<\/p>\n<p>\u6587\u4ef6\u7aef handler \u59cb\u7ec8\u4f7f\u7528\u6269\u5c55\u683c\u5f0f LOG_FORMAT&#xff1b;\u63a7\u5236\u53f0\u7aef\u5219\u6839\u636e\u914d\u7f6e\u9009\u62e9\u683c\u5f0f&#xff0c;setup_logging() \u4e2d&#xff1a;<\/p>\n<p>simple_console &#061; config.logging.simple_console<br \/>\nstream_format &#061; SIMPLE_LOG_FORMAT if simple_console else LOG_FORMAT<\/p>\n<h3>\u914d\u7f6e\u6587\u4ef6\u8be6\u89e3<\/h3>\n<h4>\u5f53\u524d\u4ed3\u5e93\u7684\u9ed8\u8ba4\u914d\u7f6e<\/h4>\n<p>Empire \u7684\u670d\u52a1\u5668\u914d\u7f6e\u4f4d\u4e8e ~\/.config\/empire\/config.yaml&#xff08;\u9996\u6b21\u542f\u52a8\u7531 config_manager.py \u4ece\u4ed3\u5e93\u5185 empire\/server\/config.yaml \u590d\u5236\u800c\u6765&#xff09;\u3002\u5f53\u524d\u4ed3\u5e93\u9ed8\u8ba4\u7684\u65e5\u5fd7\u76f8\u5173\u914d\u7f6e\u4e3a&#xff1a;<\/p>\n<p>logging:<br \/>\n  level: INFO<br \/>\n  simple_console: true<br \/>\ndebug:<br \/>\n  last_task:<br \/>\n    enabled: false<br \/>\n    file: debug\/last_task.txt<\/p>\n<p>\u5bf9\u5e94\u7684\u914d\u7f6e\u6a21\u578b\u5b9a\u4e49\u5728 config_manager.py&#xff1a;<\/p>\n<p>class LoggingConfig(EmpireBaseModel):<br \/>\n    level: str &#061; &#034;INFO&#034;<br \/>\n    simple_console: bool &#061; True<\/p>\n<p>class LastTaskConfig(EmpireBaseModel):<br \/>\n    enabled: bool &#061; False<br \/>\n    file: Path &#061; Path(&#034;debug\/last_task.txt&#034;)<\/p>\n<p>class DebugConfig(EmpireBaseModel):<br \/>\n    last_task: LastTaskConfig<\/p>\n<h4>\u5404\u5b57\u6bb5\u8bf4\u660e<\/h4>\n<ul>\n<li>logging.level&#xff1a;\u670d\u52a1\u5668 root \u65e5\u5fd7\u7684\u7ea7\u522b&#xff0c;\u9ed8\u8ba4 INFO\u3002\u63a7\u5236\u53f0\u7aef handler \u4ee5\u6b64\u7ea7\u522b\u8fc7\u6ee4&#xff08;\u89c1\u4e0b\u6587 setup_logging \u6e90\u7801&#xff09;\u3002<\/li>\n<li>logging.simple_console&#xff1a;\u5e03\u5c14\u503c&#xff0c;\u4e3a true \u65f6\u63a7\u5236\u53f0\u4f7f\u7528 Simple \u683c\u5f0f&#xff08;\u4ec5\u7ea7\u522b &#043; \u6d88\u606f&#xff09;&#xff0c;\u4e3a false \u65f6\u5207\u6362\u4e3a Expanded \u683c\u5f0f&#xff08;\u542b\u65f6\u95f4\u6233\u4e0e\u6e90\u7801\u884c\u53f7&#xff09;\u3002<\/li>\n<li>debug.last_task.enabled&#xff1a;\u5e03\u5c14\u503c&#xff0c;\u4e3a true \u65f6 Empire \u4f1a\u628a\u6700\u540e\u4e00\u6761\u4e0b\u53d1\u7ed9 agent \u7684\u4efb\u52a1\u8f93\u5165\u4fdd\u5b58\u5230\u6587\u4ef6&#xff0c;\u4fbf\u4e8e\u590d\u73b0\u4e0e\u8c03\u8bd5\u3002<\/li>\n<li>debug.last_task.file&#xff1a;\u4efb\u52a1\u8f93\u5165\u4fdd\u5b58\u8def\u5f84\u3002\u9ed8\u8ba4\u76f8\u5bf9\u8def\u5f84\u4e3a debug\/last_task.txt&#xff1b;\u7ed3\u5408 EmpireBaseModel.set_path \u5c06\u76f8\u5bf9\u8def\u5f84\u89e3\u6790\u5230 DATA_DIR \u4e0b\u7684\u884c\u4e3a&#xff0c;\u53ef\u4ee5\u63a8\u65ad\u9ed8\u8ba4\u843d\u76d8\u4f4d\u7f6e\u4e3a ~\/.local\/share\/empire\/debug\/last_task.txt\u3002\u5b57\u6bb5\u4e3a Path \u7c7b\u578b&#xff0c;\u4e5f\u652f\u6301\u914d\u7f6e\u4e3a\u7edd\u5bf9\u8def\u5f84\u3002<\/li>\n<\/ul>\n<h4>\u5173\u4e8e\u6587\u6863\u793a\u4f8b\u4e0e\u4ed3\u5e93\u9ed8\u8ba4\u503c\u7684\u5dee\u5f02\u8bf4\u660e<\/h4>\n<p>\u539f\u6587\u6863\u7ed9\u51fa\u7684\u914d\u7f6e\u793a\u4f8b\u4e3a&#xff1a;<\/p>\n<p>logging:<br \/>\n  level: INFO<br \/>\n  directory: empire\/server\/downloads\/logs\/<br \/>\n  simple_console: true<br \/>\ndebug:<br \/>\n  last_task:<br \/>\n    enabled: false<br \/>\n    file: empire\/server\/data\/last_task.txt<\/p>\n<p>\u5bf9\u7167\u5f53\u524d\u4ed3\u5e93 config.yaml \u4e0e LoggingConfig \u5b9a\u4e49\u53ef\u77e5&#xff1a;<\/p>\n<ul>\n<li>\u6587\u6863\u793a\u4f8b\u4e2d\u7684 logging.directory \u5b57\u6bb5\u5728\u5f53\u524d\u7248\u672c\u7684 LoggingConfig \u4e2d\u5e76\u672a\u5b9a\u4e49&#xff1b;\u65e5\u5fd7\u76ee\u5f55\u5b9e\u9645\u7531 DATA_DIR\/logs&#xff08;\u5373 ~\/.local\/share\/empire\/logs&#xff09;\u51b3\u5b9a&#xff0c;get_log_dir() \u6bcf\u6b21\u8c03\u7528\u90fd\u4f1a\u81ea\u52a8 mkdir \u786e\u4fdd\u76ee\u5f55\u5b58\u5728\u3002<\/li>\n<li>debug.last_task.file \u7684\u9ed8\u8ba4\u503c\u5728\u4ed3\u5e93\u4e2d\u4e3a debug\/last_task.txt&#xff0c;\u800c\u975e\u6587\u6863\u793a\u4f8b\u4e2d\u7684 empire\/server\/data\/last_task.txt\u3002<\/li>\n<\/ul>\n<p>\u56e0\u6b64\u5b9e\u9645\u4f7f\u7528\u65f6&#xff0c;\u8bf7\u4ee5\u5f53\u524d\u4ed3\u5e93 empire\/server\/config.yaml \u53ca ~\/.config\/empire\/config.yaml \u4e3a\u51c6\u3002\u65e5\u5fd7\u7ea7\u522b\u4e0e\u683c\u5f0f\u5316\u76f8\u5173\u884c\u4e3a\u53d7\u6e90\u7801\u5b9e\u73b0\u7ea6\u675f&#xff0c;\u4e24\u8005\u4e00\u81f4\u3002<\/p>\n<h3>\u547d\u4ee4\u884c\u53c2\u6570&#xff1a;&#8211;log-level \u4e0e &#8211;debug<\/h3>\n<p>\u65e5\u5fd7\u7ea7\u522b\u53ef\u4ee5\u5728\u542f\u52a8\u670d\u52a1\u5668\u65f6\u901a\u8fc7\u547d\u4ee4\u884c\u8986\u76d6&#xff0c;\u4f18\u5148\u7ea7\u9ad8\u4e8e\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<h4>&#8211;log-level &lt;level&gt;<\/h4>\n<p>\u8bbe\u7f6e\u670d\u52a1\u5668\u65e5\u5fd7\u7ea7\u522b&#xff0c;\u53d6\u503c\u5fc5\u987b\u662f\u4ee5\u4e0b\u4e4b\u4e00&#xff08;\u5927\u5c0f\u5199\u4e0d\u654f\u611f&#xff09;&#xff1a;DEBUG\u3001INFO\u3001WARNING\u3001ERROR\u3001CRITICAL\u3002<\/p>\n<p># \u4ee5 DEBUG \u7ea7\u522b\u542f\u52a8&#xff08;\u6700\u8be6\u7ec6\u7684\u65e5\u5fd7\u8f93\u51fa&#xff09;<br \/>\n.\/ps-empire server &#8211;log-level DEBUG<\/p>\n<p># \u4ec5\u8f93\u51fa\u544a\u8b66\u53ca\u4ee5\u4e0a<br \/>\n.\/ps-empire server &#8211;log-level WARNING<\/p>\n<p>\u53c2\u6570\u5b9a\u4e49\u89c1 arguments.py&#xff1a;-l \/ &#8211;log-level&#xff0c;type&#061;str.upper \u81ea\u52a8\u8f6c\u4e3a\u5927\u5199&#xff0c;choices \u9650\u5b9a\u4e86\u4e94\u6863\u5408\u6cd5\u53d6\u503c&#xff0c;\u975e\u6cd5\u503c\u4f1a\u88ab argparse \u76f4\u63a5\u62d2\u7edd\u3002<\/p>\n<h4>&#8211;debug<\/h4>\n<p>&#8211;debug \u662f &#8211;log-level DEBUG \u7684\u4fbf\u6377\u7b49\u4ef7\u5199\u6cd5&#xff08;arguments.py \u4e2d\u4f7f\u7528 store_const \u5c06 log_level \u7f6e\u4e3a DEBUG&#xff09;&#xff1a;<\/p>\n<p>.\/ps-empire server &#8211;debug<\/p>\n<h4>\u7ea7\u522b\u89e3\u6790\u7684\u4f18\u5148\u7ea7\u903b\u8f91<\/h4>\n<p>setup_logging()&#xff08;log_util.py&#xff09;\u4e2d\u7684\u89e3\u6790\u987a\u5e8f\u4e3a&#xff1a;<\/p>\n<p>def setup_logging(args, override_config&#061;None):<br \/>\n    config &#061; override_config or empire_config<br \/>\n    if args.log_level:<br \/>\n        log_level &#061; logging.getLevelName(args.log_level.upper())<br \/>\n    else:<br \/>\n        log_level &#061; logging.getLevelName(config.logging.level.upper())<\/p>\n<p>\u5373&#xff1a;\u547d\u4ee4\u884c flag \u4f18\u5148&#xff0c;\u672a\u4f20 flag \u65f6\u56de\u9000\u5230\u914d\u7f6e\u6587\u4ef6 logging.level\u3002\u65e0\u8bba\u914d\u7f6e\u4f55\u79cd\u7ea7\u522b&#xff0c;root logger \u672c\u8eab\u59cb\u7ec8\u88ab\u8bbe\u7f6e\u4e3a DEBUG&#xff08;\u6e90\u7801\u6ce8\u91ca\u660e\u786e\u6307\u51fa&#xff1a;&#034;If this isn&#039;t set to DEBUG, then we won&#039;t see debug messages from the listeners&#034;&#xff09;&#xff0c;\u5b9e\u9645\u8fc7\u6ee4\u7531\u6587\u4ef6 handler \u4e0e\u63a7\u5236\u53f0 handler \u5404\u81ea\u7684 setLevel \u5b8c\u6210\u2014\u2014\u6587\u4ef6\u7aef\u4e0d\u8bbe\u8fc7\u6ee4&#xff08;\u4fdd\u7559\u5168\u90e8&#xff09;&#xff0c;\u63a7\u5236\u53f0\u7aef\u4f7f\u7528\u6700\u7ec8\u8ba1\u7b97\u51fa\u7684 log_level\u3002<\/p>\n<h3>\u6e90\u7801\u7ea7\u5de5\u4f5c\u6d41&#xff1a;\u65e5\u5fd7\u4ece\u4ea7\u751f\u5230\u843d\u76d8<\/h3>\n<p>\u4e00\u6b21\u65e5\u5fd7\u8bb0\u5f55\u7684\u5b8c\u6574\u8def\u5f84\u5982\u4e0b&#xff1a;<\/p>\n<li>\u4ea7\u751f&#xff1a;\u6a21\u5757\u901a\u8fc7 log &#061; logging.getLogger(__name__) \u6216\u76d1\u542c\u5668\u901a\u8fc7 self.instance_log \u53d1\u51fa\u65e5\u5fd7\u8c03\u7528&#xff0c;\u4f8b\u5982 http.py \u7684 log &#061; logging.getLogger(__name__)\u3002<\/li>\n<li>\u521d\u59cb\u5316&#xff1a;\u670d\u52a1\u5668\u542f\u52a8\u65f6 server.run() \u8c03\u7528 setup_logging(args)&#xff0c;\u4e3a root logger \u6302\u8f7d\u6587\u4ef6 handler&#xff08;empire_server.log&#xff0c;Expanded \u683c\u5f0f&#xff09;\u4e0e\u63a7\u5236\u53f0 handler&#xff08;\u6309 simple_console \u9009\u62e9\u683c\u5f0f\u3001\u6309\u7ea7\u522b\u7740\u8272&#xff09;\u3002<\/li>\n<li>\u5206\u6d41&#xff1a;Listener \u542f\u52a8\u65f6 get_listener_logger() \u521b\u5efa\u72ec\u7acb logger&#xff08;propagate&#061;False&#xff09;&#xff0c;\u6587\u4ef6\u7aef\u8bb0\u5f55 DEBUG \u53ca\u4ee5\u4e0a\u81f3 listener_&lt;name&gt;.log&#xff0c;\u63a7\u5236\u53f0\u7aef\u4ec5 WARNING \u53ca\u4ee5\u4e0a\u3002<\/li>\n<li>\u843d\u76d8&#xff1a;debug.last_task.enabled \u5f00\u542f\u65f6&#xff0c;agent_task_service.py \u5728\u4e0b\u53d1\u4efb\u52a1\u65f6\u628a task_input \u5199\u5165\u914d\u7f6e\u7684 last_task.file&#xff08;\u4f7f\u7528\u7ebf\u7a0b\u9501 last_task_lock \u4fdd\u8bc1\u5e76\u53d1\u5b89\u5168&#xff0c;\u5e76\u81ea\u52a8\u521b\u5efa\u7236\u76ee\u5f55&#xff09;\u3002<\/li>\n<h3>\u6d4b\u8bd5\u9a8c\u8bc1&#xff1a;\u65e5\u5fd7\u884c\u4e3a\u6709\u636e\u53ef\u67e5<\/h3>\n<p>\u4ed3\u5e93\u5728 empire\/test\/test_logs.py \u4e2d\u63d0\u4f9b\u4e86\u65e5\u5fd7\u884c\u4e3a\u7684\u81ea\u52a8\u5316\u6d4b\u8bd5&#xff0c;\u53ef\u4f5c\u4e3a\u6392\u9519\u4e0e\u56de\u5f52\u4f9d\u636e&#xff1a;<\/p>\n<ul>\n<li>test_simple_log_format&#xff1a;\u9a8c\u8bc1\u914d\u7f6e simple_console: true \u65f6&#xff0c;\u63a7\u5236\u53f0 handler \u4f7f\u7528 ColorFormatter \u4e14\u683c\u5f0f\u4e3a SIMPLE_LOG_FORMAT\u3002<\/li>\n<li>test_extended_log_format&#xff1a;\u9a8c\u8bc1 simple_console: false \u65f6\u63a7\u5236\u53f0\u5207\u6362\u4e3a LOG_FORMAT&#xff08;Expanded&#xff09;\u3002<\/li>\n<li>test_log_level_by_config&#xff1a;\u9a8c\u8bc1\u7ea7\u522b\u53d6\u81ea\u914d\u7f6e\u6587\u4ef6&#xff0c;\u4e14\u5927\u5c0f\u5199\u4e0d\u654f\u611f&#xff08;\u6d4b\u8bd5\u4e2d\u5199\u5165 &#034;WaRNiNG&#034; \u4ecd\u89e3\u6790\u4e3a WARNING&#xff09;\u3002<\/li>\n<li>test_log_level_by_arg&#xff1a;\u9a8c\u8bc1 &#8211;log-level ERROR \u8986\u76d6\u914d\u7f6e\u6587\u4ef6\u7684 WARNING\u3002<\/li>\n<li>test_log_level_by_debug_arg&#xff1a;\u9a8c\u8bc1 &#8211;debug \u5c06 root logger \u7ea7\u522b\u7f6e\u4e3a DEBUG\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u6d4b\u8bd5\u76f4\u63a5\u5bf9\u5e94\u672c\u6587\u6240\u8ff0\u7684\u914d\u7f6e\u9879\u4e0e\u53c2\u6570\u884c\u4e3a&#xff0c;\u4fee\u6539\u914d\u7f6e\u540e\u5982\u9047\u65e5\u5fd7\u5f02\u5e38&#xff0c;\u53ef\u8fd0\u884c pytest empire\/test\/test_logs.py \u5feb\u901f\u9a8c\u8bc1\u3002<\/p>\n<h3>\u5f00\u53d1\u89c4\u8303&#xff1a;\u4f7f\u7528 logging \u66ff\u4ee3 print<\/h3>\n<p>\u81ea Empire 5 \u8d77&#xff0c;\u9879\u76ee\u7ea6\u5b9a\u6253\u5370\u5230\u63a7\u5236\u53f0\u65f6\u5e94\u4f7f\u7528 logging \u6a21\u5757&#xff0c;\u800c\u975e print \u8bed\u53e5\u3002\u539f\u56e0\u5728\u4e8e logging \u53ef\u7edf\u4e00\u53d7\u7ea7\u522b\u3001\u683c\u5f0f\u5668\u4e0e\u6587\u4ef6\u8f93\u51fa\u7ba1\u7406&#xff0c;\u800c print \u65e0\u6cd5\u88ab\u65e5\u5fd7\u4f53\u7cfb\u6355\u83b7\u4e0e\u8fc7\u6ee4\u3002\u4ed3\u5e93\u4e2d\u4ecd\u6b8b\u7559\u5c11\u91cf print&#xff08;\u591a\u4e3a\u5386\u53f2\u4ee3\u7801\u672a\u5b8c\u6210\u8fc1\u79fb&#xff09;&#xff0c;\u5b98\u65b9\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>\u80fd\u7528 logging \u66ff\u6362\u7684&#xff0c;\u66ff\u6362\u4e3a logging&#xff1b;<\/li>\n<li>\u65e0\u4fdd\u7559\u4ef7\u503c\u7684&#xff0c;\u76f4\u63a5\u5220\u9664&#xff1b;<\/li>\n<li>\u9700\u8981\u7531 API \u8fd4\u56de\u7ed9\u524d\u7aef\u7684\u8f93\u51fa&#xff08;\u5982 stager \u751f\u6210\u7ed3\u679c&#xff09;&#xff0c;\u5e94\u901a\u8fc7 API \u8fd4\u56de\u503c\u4f20\u9012&#xff0c;\u800c\u4e0d\u662f print\u3002<\/li>\n<\/ul>\n<h3>\u672a\u6765\u7279\u6027\u5c55\u671b<\/h3>\n<p>\u539f\u6587\u6863\u540c\u65f6\u5217\u51fa\u4e86\u4e24\u4e2a\u89c4\u5212\u4e2d\u7684\u589e\u5f3a\u65b9\u5411&#xff0c;\u53ef\u4f5c\u4e3a\u4e8c\u6b21\u5f00\u53d1\u6216\u63d2\u4ef6\u4f5c\u8005\u7684\u53c2\u8003&#xff1a;<\/p>\n<ul>\n<li>JSON \u65e5\u5fd7&#xff1a;\u8ba1\u5212\u652f\u6301 JSON \u683c\u5f0f\u8f93\u51fa&#xff0c;\u4fbf\u4e8e\u65e5\u5fd7\u89e3\u6790\u4e0e\u5bf9\u63a5\u5916\u90e8\u5de5\u5177&#xff08;\u5982 structlog\u3001python-json-logger \u7b49\u7ed3\u6784\u5316\u65e5\u5fd7\u751f\u6001&#xff09;\u3002<\/li>\n<li>\u63d2\u4ef6\u72ec\u7acb\u65e5\u5fd7&#xff1a;\u8ba1\u5212\u4e3a\u6bcf\u4e2a\u63d2\u4ef6\u5206\u914d\u72ec\u7acb\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u5e76\u914d\u5957&#034;\u62c9\u53d6 \/ tail \u6307\u5b9a\u63d2\u4ef6\u65e5\u5fd7&#034;\u7684 API \u7aef\u70b9&#xff0c;\u4fbf\u4e8e\u5728 Starkiller \u4e2d\u67e5\u770b\u5355\u6b21\u63d2\u4ef6\u6267\u884c\u4ea7\u751f\u7684\u5927\u91cf\u8f93\u51fa&#xff0c;\u8f85\u52a9\u8c03\u8bd5\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e24\u9879\u5747\u5904\u4e8e\u89c4\u5212\u9636\u6bb5&#xff0c;\u5f53\u524d\u4ed3\u5e93\u5c1a\u672a\u843d\u5730&#xff0c;\u4f7f\u7528\u65f6\u5e94\u4ee5\u73b0\u6709 logging.level\u3001logging.simple_console \u4e0e debug.last_task \u914d\u7f6e\u4e3a\u51c6\u3002<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>Empire \u7684\u65e5\u5fd7\u4f53\u7cfb\u56f4\u7ed5&#034;\u670d\u52a1\u5668\u65e5\u5fd7 &#043; Listener \u72ec\u7acb\u65e5\u5fd7&#034;\u7684\u53cc\u901a\u9053\u8bbe\u8ba1\u5c55\u5f00&#xff1a;\u65e5\u5fd7\u76ee\u5f55\u56fa\u5b9a\u4e8e ~\/.local\/share\/empire\/logs\/&#xff0c;\u7ea7\u522b\u7531\u547d\u4ee4\u884c &#8211;log-level\/&#8211;debug \u4f18\u5148\u4e8e\u914d\u7f6e\u6587\u4ef6 logging.level \u51b3\u5b9a&#xff0c;\u63a7\u5236\u53f0\u683c\u5f0f\u7531 simple_console \u5207\u6362&#xff0c;\u8c03\u8bd5\u671f\u53ef\u501f\u52a9 debug.last_task \u843d\u76d8\u6700\u8fd1\u4e00\u6b21\u4efb\u52a1\u8f93\u5165\u3002\u638c\u63e1\u8fd9\u4e9b\u914d\u7f6e\u4e0e\u6e90\u7801\u5b9e\u73b0&#xff0c;\u5373\u53ef\u5728\u5b9e\u6218\u6392\u9519\u4e2d\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898&#xff1a;\u5148\u770b listener_&lt;name&gt;.log \u67e5\u901a\u4fe1\u660e\u7ec6&#xff0c;\u518d\u4ee5 &#8211;log-level DEBUG \u91cd\u542f\u670d\u52a1\u5668\u83b7\u5f97\u5b8c\u6574\u8c03\u7528\u8f68\u8ff9\u3002<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" class=\"gcb-icon-like\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261013032504-6acda490b9f10.svg\" alt=\"\" width=\"16\" height=\"16\" \/> <span class=\"gcb-like-text\">\u8d5e<\/span>  <\/p>\n<p>   <span class=\"gcb-share-text\">\u5206\u4eab<\/span>  <\/p>\n<ul class=\"gcb-tag-list\">\n<li><span class=\"gcb-tag\">\u6e17\u900f\u6d4b\u8bd5<\/span><\/li>\n<li><span class=\"gcb-tag\">\u7f51\u7edc\u5b89\u5168<\/span><\/li>\n<li><span class=\"gcb-tag\">\u5e94\u7528\u5b89\u5168<\/span><\/li>\n<\/ul>\n<h3 class=\"gcb-project-title\">\u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011Empire<\/h3>\n<p class=\"gcb-project-desc\">Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers.<\/p>\n<p>    <span class=\"gcb-project-addr-label\">\u9879\u76ee\u5730\u5740&#xff1a;<\/span><br \/>\n    <span class=\"gcb-project-addr-link\">https:\/\/gitcode.com\/gh_mirrors\/empi\/Empire<\/span> <\/p>\n<p>  <span class=\"gcb-project-btn\"> <span class=\"gcb-project-btn-main\">\u70b9\u51fb\u67e5\u770b<\/span> <span class=\"gcb-project-btn-sub\">\u514d\u8d39\u4e0b\u8f7d<\/span> <\/span> <\/p>\n<h4 class=\"gcb-related-title\">\u76f8\u5173\u63a8\u8350<\/h4>\n<ul class=\"gcb-related-list\">\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">3\u6b65\u5b9e\u6218\u6253\u9020Windows\u6781\u81f4\u4f18\u5316&#xff1a;AtlasOS\u6027\u80fd\u4e0e\u9690\u79c1\u7684\u5b8c\u6574\u65b9\u6848<\/h5>\n<p class=\"gcb-related-item-desc\">3\u6b65\u5b9e\u6218\u6253\u9020Windows\u6781\u81f4\u4f18\u5316&#xff1a;AtlasOS\u6027\u80fd\u4e0e\u9690\u79c1\u7684\u5b8c\u6574\u65b9\u6848 \u4f60\u662f\u5426\u66fe\u7ecf\u611f\u89c9Windows\u7cfb\u7edf\u8d8a\u7528\u8d8a\u6162&#xff0c;\u540e\u53f0\u7a0b\u5e8f\u50cf\u65e0\u5f62\u7684\u5438\u8840\u9b3c\u4e00\u6837\u541e\u566c\u7740\u4f60\u7684\u7cfb\u7edf\u8d44\u6e90&#xff1f;<\/p>\n<p>     <span class=\"gcb-tag\">\u64cd\u4f5c\u7cfb\u7edf<\/span><br \/>\n     <span class=\"gcb-tag\">\u9690\u79c1\u5408\u89c4<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\">Sails \u6846\u67b6\u65e5\u5fd7\u673a\u5236\u5b8c\u5168\u6307\u5357&#xff1a;sails.log \u7528\u6cd5\u3001\u65e5\u5fd7\u7ea7\u522b\u4e0e\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5668\u914d\u7f6e<\/h5>\n<p class=\"gcb-related-item-desc\">Sails \u6846\u67b6\u65e5\u5fd7\u673a\u5236\u5b8c\u5168\u6307\u5357&#xff1a;sails.log \u7528\u6cd5\u3001\u65e5\u5fd7\u7ea7\u522b\u4e0e\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5668\u914d\u7f6e Sails \u4f5c\u4e3a\u4e00\u6b3e\u9762\u5411 Node.js \u7684\u5b9e\u65f6 MVC \u6846\u67b6&#xff0c;\u5185\u7f6e\u4e86\u4e00<\/p>\n<p>     <span class=\"gcb-tag\">\u540e\u7aef<\/span>\n      <\/li>\n<li class=\"gcb-related-item\">\n<h5 class=\"gcb-related-item-title\"> wger\u5bb9\u5668\u65e5\u5fd7&#xff1a;\u914d\u7f6e\u5065\u8eab\u670d\u52a1\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f<\/h5>\n<p class=\"gcb-related-item-desc\">wger\u5bb9\u5668\u65e5\u5fd7&#xff1a;\u914d\u7f6e\u5065\u8eab\u670d\u52a1\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f \u8fd8\u5728\u4e3awger\u5065\u8eab\u5e94\u7528\u7684\u5bb9\u5668\u65e5\u5fd7\u6df7\u4e71\u800c\u70e6\u607c&#xff1f;\u4e00\u6587\u6559\u4f60\u5982\u4f55\u914d\u7f6e\u4e13\u4e1a\u7ea7\u7684\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f&#xff0c;\u8ba9\u5065\u8eab\u670d\u52a1\u76d1\u63a7\u53d8\u5f97\u8f7b\u677e\u9ad8\u6548&#xff01; \u8bfb<\/p>\n<p>     <span class=\"gcb-tag\">\u540e\u7aef<\/span><br \/>\n     <span class=\"gcb-tag\">\u533b\u7597\u5065\u5eb7<\/span>\n      <\/li>\n<\/ul>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0a\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  Web3UIKit\u901a\u77e5\u7cfb\u7edf\u5b8c\u5168\u6307\u5357&#xff1a;\u5982\u4f55\u4f7f\u7528useNotification\u548cNotificationProvider\u6784\u5efaDApp\u7528\u6237\u53cd\u9988 <\/p>\n<p>  <span class=\"gcb-prev-next-label\">\u4e0b\u4e00\u7bc7&#xff1a;<\/span><br \/>\n  \u7ec8\u6781\u6f0f\u6d1e\u641c\u7d22\u795e\u5668Findsploit&#xff1a;\u6e17\u900f\u6d4b\u8bd5\u5fc5\u5907\u768410\u4e2a\u9ad8\u6548\u6280\u5de7 <\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6e17\u900f\u6d4b\u8bd5\u7f51\u7edc\u5b89\u5168\u5e94\u7528\u5b89\u5168 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011Empire Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/empi\/Empire \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d  Empire \u4f5c\u4e3a\u4e00\u6b3e\u540e\u6e17\u900f\u4e0e\u5bf9\u6297\u6a21\u62df&amp;#xff08<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-115784","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/115784.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6e17\u900f\u6d4b\u8bd5\u7f51\u7edc\u5b89\u5168\u5e94\u7528\u5b89\u5168 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011Empire Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/empi\/Empire \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d Empire \u4f5c\u4e3a\u4e00\u6b3e\u540e\u6e17\u900f\u4e0e\u5bf9\u6297\u6a21\u62df&amp;#xff08\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115784.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-13T03:25:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261013032504-6acda490b9f10.svg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115784.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115784.html\",\"name\":\"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-13T03:25:05+00:00\",\"dateModified\":\"2026-10-13T03:25:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115784.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115784.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115784.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/115784.html","og_locale":"zh_CN","og_type":"article","og_title":"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6e17\u900f\u6d4b\u8bd5\u7f51\u7edc\u5b89\u5168\u5e94\u7528\u5b89\u5168 \u3010\u514d\u8d39\u4e0b\u8f7d\u94fe\u63a5\u3011Empire Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers. \u9879\u76ee\u5730\u5740&#xff1a; https:\/\/gitcode.com\/gh_mirrors\/empi\/Empire \u70b9\u51fb\u67e5\u770b \u514d\u8d39\u4e0b\u8f7d Empire \u4f5c\u4e3a\u4e00\u6b3e\u540e\u6e17\u900f\u4e0e\u5bf9\u6297\u6a21\u62df&amp;#xff08","og_url":"https:\/\/www.wsisp.com\/helps\/115784.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-13T03:25:05+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261013032504-6acda490b9f10.svg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115784.html","url":"https:\/\/www.wsisp.com\/helps\/115784.html","name":"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-13T03:25:05+00:00","dateModified":"2026-10-13T03:25:05+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115784.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115784.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115784.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Empire \u6846\u67b6\u670d\u52a1\u5668\u65e5\u5fd7\u4f53\u7cfb\u5b9e\u6218\u6307\u5357\uff1a\u65e5\u5fd7\u7ea7\u522b\u3001Listener \u72ec\u7acb\u65e5\u5fd7\u3001\u683c\u5f0f\u5668\u4e0e\u914d\u7f6e\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=115784"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115784\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115784"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}