1 line
7.0 KiB
JSON
1 line
7.0 KiB
JSON
|
|
{"ast":null,"code":"let axios_config = require(\"./config\");\nimport { ZeroCodeAxios } from \"@/request/request\";\nconst components = {};\nconst data = function () {\n return {\n scan_form: {\n url: \"\",\n cookie: \"\",\n getCurrentDb: true,\n getCurrentUser: true,\n getDbs: true,\n getTables: true,\n getColumns: true\n },\n info_show: \"\"\n };\n};\nfunction mounted() {}\nconst methods = {\n get_config_data(config_data) {\n let new_data = config_data;\n new_data = this.format_data(config_data);\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 submit_sqlmap() {\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 this.info_show = JSON.stringify(this.info_show);\n });\n }\n};\nexport default {\n data: data,\n methods: methods,\n mounted: mounted,\n components: components\n};","map":{"version":3,"names":["axios_config","require","ZeroCodeAxios","components","data","scan_form","url","cookie","getCurrentDb","getCurrentUser","getDbs","getTables","getColumns","info_show","mounted","methods","get_config_data","config_data","new_data","format_data","dict","eval","key","value","includes","hasOwnProperty","submit_sqlmap","method","originalData","then","submit_scan","axios","JSON","parse","stringify","res"],"sources":["/Users/xubincheng/Desktop/job/zero_code_all/zero_project/ZeroCodeProject/main/client/src/components/sqlmap/sqlmap.js"],"sourcesContent":["let axios_config = require(\"./config\")\nimport {ZeroCodeAxios} from \"@/request/request\"\n\nconst components = {}\n\nconst data = function () {\n return {\n scan_form: {\n url: \"\",\n cookie: \"\",\n getCurrentDb: true,\n getCurrentUser: true,\n getDbs: true,\n getTables: true,\n getColumns: true\n },\n info_show: \"\"\n }\n}\n\nfunction mounted() {\n\n}\n\nconst methods = {\n get_config_data(config_data) {\n let new_data = config_data\n new_data = this.format_data(config_data)\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
|