Compare commits
No commits in common. "cad62bd3e2016613297445bff70b0a3eb7ad4c5a" and "bbfba0d6e48de6ae6422af580efabd3a511b6a0b" have entirely different histories.
cad62bd3e2
...
bbfba0d6e4
4 changed files with 11 additions and 20 deletions
|
@ -217,7 +217,7 @@ def get_model_action(data: dict):
|
||||||
def is_accepted_query(data: dict) -> bool:
|
def is_accepted_query(data: dict) -> bool:
|
||||||
model, action = get_model_action(data)
|
model, action = get_model_action(data)
|
||||||
if model in ['Event', 'Attribute', 'Object', 'Tag',]:
|
if model in ['Event', 'Attribute', 'Object', 'Tag',]:
|
||||||
if action in ['add', 'edit', 'delete', 'publish', 'tag']:
|
if action in ['add', 'edit', 'delete', 'publish']:
|
||||||
# # improved condition below. It blocks some queries
|
# # improved condition below. It blocks some queries
|
||||||
# if data['Log']['change'].startswith('attribute_count'):
|
# if data['Log']['change'].startswith('attribute_count'):
|
||||||
# return False
|
# return False
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
"inject_uuid": "4c242d49-fcf7-4c76-974b-6d5983c0eff9",
|
"inject_uuid": "4c242d49-fcf7-4c76-974b-6d5983c0eff9",
|
||||||
"reporting_callback": [],
|
"reporting_callback": [],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"inject_uuid": "de9f4c9b-dc97-4e84-85f3-859f30d3a3cd"
|
"inject_uuid": ""
|
||||||
},
|
},
|
||||||
"sequence": {
|
"sequence": {
|
||||||
"completion_trigger": [
|
"completion_trigger": [
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
".Event.Object[].Attribute[] | select((.type == \"domain\") or (.type == \"hostname\")).value": {
|
".Event.Object[].Attribute[] | select((.type == \"domain\")).value": {
|
||||||
"extract_type": "all",
|
"extract_type": "all",
|
||||||
"comparison": "equals",
|
"comparison": "equals",
|
||||||
"values": [
|
"values": [
|
||||||
|
@ -454,8 +454,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
".Event.Object[] | select((.name == \"person\")).distribution": {
|
".Event.Object[] | select((.name == \"domain-ip\")).distribution": {
|
||||||
"comparison": "equals_any",
|
"comparison": "contains",
|
||||||
"values": [
|
"values": [
|
||||||
"0",
|
"0",
|
||||||
"1",
|
"1",
|
||||||
|
|
|
@ -46,8 +46,6 @@ def eval_condition_str(evaluation_config: dict, data_to_validate: str) -> bool:
|
||||||
return len(intersection) == len(values_set)
|
return len(intersection) == len(values_set)
|
||||||
elif comparison_type == 'equals':
|
elif comparison_type == 'equals':
|
||||||
return data_to_validate == values[0]
|
return data_to_validate == values[0]
|
||||||
elif comparison_type == 'equals_any':
|
|
||||||
return data_to_validate in values
|
|
||||||
elif comparison_type == 'regex':
|
elif comparison_type == 'regex':
|
||||||
return re.fullmatch(values[0], data_to_validate)
|
return re.fullmatch(values[0], data_to_validate)
|
||||||
elif comparison_type == 'count':
|
elif comparison_type == 'count':
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted } from 'vue'
|
import { ref, computed, onMounted } from 'vue'
|
||||||
import { exercises, selected_exercises, diagnostic, fullReload, resetAllExerciseProgress, resetLiveLogs, changeExerciseSelection, debouncedGetDiangostic } from "@/socket";
|
import { exercises, selected_exercises, diagnostic, resetAllExerciseProgress, resetLiveLogs, changeExerciseSelection, debouncedGetDiangostic } from "@/socket";
|
||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||||
import { faScrewdriverWrench, faTrash, faSuitcaseMedical, faGraduationCap, faBan, faRotate } from '@fortawesome/free-solid-svg-icons'
|
import { faScrewdriverWrench, faTrash, faSuitcaseMedical, faGraduationCap, faBan } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
const admin_modal = ref(null)
|
const admin_modal = ref(null)
|
||||||
|
|
||||||
|
@ -44,25 +44,18 @@
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="flex mb-5 gap-1">
|
<div class="flex mb-5 gap-1">
|
||||||
<button
|
|
||||||
@click="fullReload()"
|
|
||||||
class="h-10 min-h-10 px-2 py-1 font-semibold bg-blue-600 text-slate-200 hover:bg-blue-700 btn btn-sm gap-1"
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon :icon="faRotate" size="lg" fixed-width></FontAwesomeIcon>
|
|
||||||
Full refresh
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
@click="resetAllExerciseProgress()"
|
@click="resetAllExerciseProgress()"
|
||||||
class="h-10 min-h-10 px-2 py-1 font-semibold bg-red-600 text-slate-200 hover:bg-red-700 btn btn-sm gap-1"
|
class="h-10 min-h-10 px-2 py-1 font-semibold bg-red-600 text-slate-200 hover:bg-red-700 btn btn-sm"
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon :icon="faTrash" size="lg" fixed-width></FontAwesomeIcon>
|
<FontAwesomeIcon :icon="faTrash" class="mr-1"></FontAwesomeIcon>
|
||||||
Reset All Exercises
|
Reset All Exercises
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@click="resetLiveLogs()"
|
@click="resetLiveLogs()"
|
||||||
class="h-10 min-h-10 px-2 py-1 font-semibold bg-amber-600 text-slate-200 hover:bg-amber-700 btn btn-sm gap-1"
|
class="h-10 min-h-10 px-2 py-1 font-semibold bg-amber-600 text-slate-200 hover:bg-amber-700 btn btn-sm"
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon :icon="faBan" size="lg"> fixed-width</FontAwesomeIcon>
|
<FontAwesomeIcon :icon="faBan" class=""></FontAwesomeIcon>
|
||||||
Clear Live Logs
|
Clear Live Logs
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue