fix: fix some bugs (#17)

This commit is contained in:
Li4n0
2021-05-18 22:45:18 +08:00
committed by GitHub
parent 5b63e90390
commit bc6e3962f8
23 changed files with 151 additions and 121 deletions
+14 -6
View File
@@ -2,8 +2,9 @@
<a-layout id="nav">
<a-layout-sider v-model="collapsed" :trigger="null" collapsible>
<div class="logo"><b>R</b><span v-if="!collapsed"><b>ev</b>Suit</span></div>
<a-menu theme="dark" mode="inline" :selectedKeys="[this.$route.path]" :open-keys.sync='openKeys'>
<!-- <a-menu-item key="/">-->
<a-menu theme="dark" mode="inline" :selectedKeys="[this.$route.path]" :openKeys.sync="openKeys">
<!-- <a-menu-item key="
/">-->
<!-- <router-link to="/">-->
<!-- <a-icon type="dashboard"/>-->
<!-- <span>Dashboard</span>-->
@@ -48,8 +49,7 @@
<a-menu-item key="/settings">
<router-link to="/settings">
<a-icon type="setting"/>
Settings
</router-link>
<span>Settings</span></router-link>
</a-menu-item>
</a-menu>
</a-layout-sider>
@@ -60,7 +60,7 @@
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="() => (collapsed = !collapsed)"
/>
<div v-if="isLogMode" style="float: right; min-width:50% ;padding: 12px 0;line-height: 24px;">
<div v-if="isLogMode" style="float: right; min-width:60% ;padding: 12px 0;line-height: 24px;">
<a-row :gutter="24" type="flex">
<a-col :span="21">
<a-form-model v-show="showSettings" ref="settings" layout="inline">
@@ -123,7 +123,7 @@ export default {
pageSize: store.pageSize,
collapsed: false,
showSettings: false,
openKeys: ['logs'],
openKeys: [],
version: "",
};
},
@@ -153,6 +153,14 @@ export default {
}
this.GetVersion()
},
created() {
let unwatch = this.$watch('$route', function (to, from) {
if (from.path === "/" && this.openKeys.length === 0) {
this.openKeys.push(to.path.split("/")[1])
unwatch()
}
})
},
destroyed() {
clearInterval(this.timer)
},
+4 -4
View File
@@ -15,13 +15,13 @@
<a-form-model-item :rules="rules.flagFormat" prop="flag_format">
<span slot="label">
Flag Format&nbsp;
<a-tooltip title="Basic usage:
1. Only when the request contains content that satisfies the flag format, the request will be captured.
<a-tooltip :title="`Basic usage:
1. Only when the request's ${flagField} contains content that satisfies the flag format, the request will be captured.
2. Use regular expression syntax.
3. The character '*' means to capture all requests.
Advanced usage:
1. When the regex uses grouping without group name, the platform will only notify the user or push to the client when the first group appears for the first time.
2. When the regex uses grouping with group name, you can get these submatches through template variables and use them in other fields of the rule.">
2. When the regex uses grouping with group name, you can get these submatches through template variables and use them in other fields of the rule.`">
<a-icon type="question-circle-o"/>
</a-tooltip>
</span>
@@ -97,7 +97,7 @@ export default {
},
}
},
props: ['form', 'readOnly']
props: ['form', 'readOnly', 'flagField']
}
</script>
+11 -5
View File
@@ -13,7 +13,7 @@
@close="closeDrawer"
>
<a-form-model :model="form" ref="form" layout="vertical" @submit="handleSubmit">
<BasicRule :form="form" :readOnly="formReadOnly"/>
<BasicRule :form="form" :readOnly="formReadOnly" :flagField="'user or schema'"/>
<a-row :gutter="24">
<a-col :span="24">
<a-form-model-item label="Files" :rules="rules.files">
@@ -31,7 +31,8 @@
<a-form-model-item>
<div class="ant-form-item-label">
<label for="exploit-jdbc-client">Exploit Jdbc Client
<a-tooltip placement="topLeft" title="Whether test to exploit jdbc client.">
<a-tooltip placement="topLeft"
title="Whether test to exploit jdbc client.">
<a-icon type="question-circle"/>
</a-tooltip>
</label>
@@ -41,8 +42,13 @@
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<a-form-model-item label="Payload">
<a-input-group compact v-for="payloadKey in payloadKeys" :key="payloadKey">
<a-form-model-item>
<label for="payload">Payload
<a-tooltip placement="topLeft" title="Need to set ${payload} variable by flag format first. Payload which key is same as ${payload} will be used.">
<a-icon type="question-circle"/>
</a-tooltip>
</label>
<a-input-group id="payload" compact v-for="payloadKey in payloadKeys" :key="payloadKey">
<a-input v-model="form['Key-'+payloadKey]"
style="width: 47%;margin-bottom: 5px"
v-decorator="['Key-'+payloadKey,]"
@@ -256,7 +262,7 @@ export default {
onShowSizeChange: (current, size) => {
store.pageSize = size
}
}, filters: {},
}, filters: {},
loading: false,
columns,
form: {},