Files
ZERO_CODE/ZeroCodeProject/main/client/node_modules/.cache/babel-loader/702328c1a8ea3229eb4d7aa9efb87b59f370a9f6b80f16c594888b07eefe46e9.json

1 line
14 KiB
JSON
Raw Normal View History

2026-01-11 00:11:34 +08:00
{"ast":null,"code":"let axios_config = require(\"./config\");\nimport { ZeroCodeAxios } from \"@/request/request\";\nconst components = {};\nconst data = function () {\n return {\n waf_status: {\n modsecurity_installed: false,\n modsecurity_config: false,\n owasp_crs: false\n },\n ufw_status: false\n };\n};\nfunction mounted() {}\nconst methods = {\n get_config_data(config_data) {\n console.log(config_data);\n // 执行转译data\n let new_data = {\n \"interaction_name\": config_data[\"interaction_name\"],\n \"return_data\": config_data[\"return_data\"],\n \"submit_data\": {\n \"interaction_source_name\": config_data[\"submit_data\"][\"interaction_source_name\"],\n \"interaction_source_uuid\": config_data[\"submit_data\"][\"interaction_source_uuid\"],\n \"interaction_object_type\": config_data[\"submit_data\"][\"interaction_object_type\"],\n \"interaction_style\": config_data[\"submit_data\"][\"interaction_style\"],\n \"target_table\": config_data[\"submit_data\"][\"target_table\"],\n \"target_api_url\": config_data[\"submit_data\"][\"target_api_url\"],\n \"target_api_ID\": config_data[\"submit_data\"][\"target_api_ID\"]\n }\n };\n let re = this.format_data(config_data[\"submit_data\"][\"data\"]);\n new_data[\"submit_data\"][\"data\"] = re;\n return new_data;\n },\n format_data(dict) {\n if (typeof dict == \"string\") {\n dict = eval(dict);\n } else {\n for (const key in dict) {\n let value = dict[key];\n if (typeof value == \"object\") {\n this.format_data(value);\n } else {\n if (typeof value == 'number') {\n dict[key] = value;\n } else {\n if (value.includes(\"this.\")) {\n if (dict.hasOwnProperty(key)) {\n dict[key] = eval(value);\n }\n } else {\n if (value.includes(\".\")) {\n if (dict.hasOwnProperty(key)) {\n dict[key] = eval(value);\n }\n } else {\n dict[key] = value;\n }\n }\n }\n }\n }\n }\n return dict;\n },\n get_waf_info() {\n const {\n url,\n method,\n data: originalData,\n then\n } = axios_config.submit_scan.axios;\n const data = JSON.parse(JSON.stringify(originalData));\n let new_data = this.get_config_data(data);\n // 发起请求\n ZeroCodeAxios({\n method,\n url,\n data: new_data\n }).then(res => {\n // 执行回调函数then回调\n eval(then);\n });\n },\n install_waf() {\n const {\n url,\n method,\n data: originalData,\n then\n } = axios_config.submit_scan.axios;\n const data = JSON.parse(JSON.stringify(originalData));\n let new_data = this.get_config_data(data);\n // 发起请求\n ZeroCodeAxios({\n method,\n url,\n data: new_data\n }).then(res => {\n // 执行回调函数then回调\n eval(then);\n });\n },\n open_ufw() {\n const {\n url,\n method,\n data: originalData,\n then\n } = axios_config.submit_scan.axios;\n const data = JSON.parse(JSON.stringify(originalData));\n let new_data = this.get_config_data(data);\n // 发起请求\n ZeroCodeAxios({\n method,\n url,\n data: new_data\n }).then(res => {\n // 执行回调函数then回调\n eval(then);\n });\n },\n get_log_analyze() {\n const {\n url,\n method,\n data: originalData,\n then\n } = axios_config.submit_scan.axios;\n const data = JSON.parse(JSON.stringify(originalData));\n let new_data = this.get_config_data(data);\n // 发起请求\n ZeroCodeAxios({\n method,\n url,\n data: new_data\n }).then(res => {\n // 执行回调函数then回调\n eval(then);\n });\n },\n ban_ip() {\n const {\n url,\n method,\n data: originalData,\n th