Skip to main content
Version: 3.7

Event 组件事件

1. 结构声明

class Event extends BaseNode {
name: string = '';
group?: string;
title?: string;
description: string;
advanced?: boolean;
params: Array<Param>;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "Event",
"name": "confirm",
"description": "确定事件",
"params": [
{
"concept": "Param",
"name": "payload",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String",
"inferred": false,
"ruleMap": {}
},
"description": "数据量"
}
]
}

对应的代码如下:

@(
description = "确定事件",
)
onConfirm: (payload: String) => null