mirror of
https://github.com/mandiant/capa.git
synced 2026-01-13 21:36:35 -08:00
add comments to rule column components
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="node.data.type === 'rule'">
|
||||
{{ node.data.name }}
|
||||
<!--- example node: "parse PE headers (2 matches) lib" --->
|
||||
<div class="cursor-pointer">
|
||||
<span>{{ node.data.name }}</span>
|
||||
<span v-if="node.data.matchCount > 1" class="font-italic"> ({{ node.data.matchCount }} matches) </span>
|
||||
<LibraryTag v-if="node.data.lib && node.data.matchCount" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--- example node: "basic block @ 0x401000" or "explorer.exe" --->
|
||||
<template v-else-if="node.data.type === 'match location'">
|
||||
<span class="text-sm font-italic">{{ node.data.name }}</span>
|
||||
<span class="text-sm font-italic cursor-pointer">{{ node.data.name }}</span>
|
||||
</template>
|
||||
|
||||
<!--- example node: "- or", "- and" --->
|
||||
<template v-else-if="node.data.type === 'statement'"
|
||||
>-
|
||||
<span
|
||||
@@ -17,25 +26,31 @@
|
||||
{{ node.data.name }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!--- example node: "- api: GetProcAddress", "- regex: .*\\.exe" --->
|
||||
<template v-else-if="node.data.type === 'feature'">
|
||||
<span
|
||||
>- {{ node.data.typeValue }}:
|
||||
<span :class="{ 'text-green-700': node.data.typeValue !== 'regex' }" style="font-family: monospace">{{
|
||||
node.data.name
|
||||
}}</span></span
|
||||
>
|
||||
<span :class="{ 'text-green-700': node.data.typeValue !== 'regex' }" style="font-family: monospace"
|
||||
>{{ node.data.name }}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!--- example node: "- malware.exe" (these are the captures (children nodes) of regex nodes) --->
|
||||
<template v-else-if="node.data.type === 'regex-capture'">
|
||||
- <span class="text-green-700" style="font-family: monospace">{{ node.data.name }}</span>
|
||||
</template>
|
||||
|
||||
<!--- example node: "exit(0) -> 0" (if the node type is call-info, we highlight node.data.name.callInfo) --->
|
||||
<template v-else-if="node.data.type === 'call-info'">
|
||||
<highlightjs lang="c" :code="node.data.name.callInfo" style="background-color: #f0f0f0" />
|
||||
<highlightjs lang="c" :code="node.data.name.callInfo" />
|
||||
</template>
|
||||
|
||||
<!-- example node: " = IMAGE_NT_SIGNATURE (PE)" --->
|
||||
<span v-if="node.data.description" class="text-gray-500 text-sm" style="font-size: 90%">
|
||||
= {{ node.data.description }}
|
||||
</span>
|
||||
<span v-if="node.data.matchCount > 1" class="font-italic"> ({{ node.data.matchCount }} matches) </span>
|
||||
<LibraryTag v-if="node.data.lib && node.data.matchCount" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user