@deepbounty/sdk 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events.d.ts +5 -1
- package/dist/index.d.ts +11 -1
- package/dist/types/burpsuite.d.ts +6 -4
- package/dist/types/tasks.d.ts +6 -0
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { HttpTraffic } from "./types/burpsuite";
|
|
1
|
+
import { TrafficContext, HttpTraffic } from "./types/burpsuite";
|
|
2
2
|
/**
|
|
3
3
|
* Predefined core events emitted by the server
|
|
4
4
|
* Modules can also emit custom events for inter-module communication
|
|
5
5
|
*/
|
|
6
6
|
export interface CoreEvents {
|
|
7
7
|
"http:traffic": HttpTraffic;
|
|
8
|
+
"http:js": {
|
|
9
|
+
context: TrafficContext;
|
|
10
|
+
js: string;
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
/**
|
|
10
14
|
* Event handler function signature
|
package/dist/index.d.ts
CHANGED
|
@@ -90,16 +90,26 @@ export interface ServerAPI {
|
|
|
90
90
|
* @param description Task description
|
|
91
91
|
* @param taskContent The task content including commands and tools
|
|
92
92
|
* @param interval Interval in seconds between task executions
|
|
93
|
+
* @param schedulingType How to schedule tasks: "TARGET_BASED" (one per target), "GLOBAL" (single instance), or "CUSTOM" (manual control)
|
|
93
94
|
* @param onComplete Optional callback executed when the task completes
|
|
94
95
|
* @returns The ID of the registered task template
|
|
95
96
|
*/
|
|
96
|
-
registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, onComplete?: (result: TaskResult) => void): Promise<number>;
|
|
97
|
+
registerTaskTemplate(uniqueKey: string, name: string, description: string, taskContent: TaskContent, interval: number, schedulingType?: "TARGET_BASED" | "GLOBAL" | "CUSTOM", onComplete?: (result: TaskResult) => void): Promise<number>;
|
|
97
98
|
/**
|
|
98
99
|
* Unregister a task template
|
|
99
100
|
* @param templateId The ID of the task template to unregister
|
|
100
101
|
* @returns true if the template was unregistered, false if it didn't exist
|
|
101
102
|
*/
|
|
102
103
|
unregisterTaskTemplate(templateId: number): Promise<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* Create a task instance manually (for CUSTOM scheduling type)
|
|
106
|
+
* @param templateId The ID of the task template
|
|
107
|
+
* @param targetId Optional target ID for this instance
|
|
108
|
+
* @param customData Optional custom data to attach to this instance (accessible via {{KEY}} placeholders)
|
|
109
|
+
* @param oneTime If true, delete the scheduled task after execution (default: false)
|
|
110
|
+
* @returns The scheduled task ID
|
|
111
|
+
*/
|
|
112
|
+
createTaskInstance(templateId: number, targetId?: number, customData?: Record<string, any>, oneTime?: boolean): Promise<number>;
|
|
103
113
|
/** Register a tool
|
|
104
114
|
* @param tool The tool to register
|
|
105
115
|
*/
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTP traffic data from Burp Suite
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
4
|
+
export interface TrafficContext {
|
|
5
5
|
url: string;
|
|
6
6
|
method: string;
|
|
7
7
|
statusCode: number;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TrafficContent {
|
|
8
11
|
requestHeaders: Record<string, string>;
|
|
9
12
|
responseHeaders: Record<string, string>;
|
|
10
13
|
requestBody: string;
|
|
11
14
|
responseBody: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
targetId?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface HttpTraffic extends TrafficContext, TrafficContent {
|
|
15
17
|
}
|
package/dist/types/tasks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Tool } from "./tools";
|
|
2
|
+
export type SchedulingType = "TARGET_BASED" | "GLOBAL" | "CUSTOM";
|
|
2
3
|
export interface TaskContent {
|
|
3
4
|
commands: string[];
|
|
4
5
|
requiredTools?: Tool[];
|
|
@@ -12,6 +13,7 @@ export interface TaskTemplate {
|
|
|
12
13
|
description?: string;
|
|
13
14
|
content: TaskContent;
|
|
14
15
|
interval: number;
|
|
16
|
+
schedulingType: SchedulingType;
|
|
15
17
|
active: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface ScheduledTask {
|
|
@@ -24,6 +26,8 @@ export interface ScheduledTask {
|
|
|
24
26
|
lastExecutedAt?: Date;
|
|
25
27
|
nextExecutionAt: Date;
|
|
26
28
|
active: boolean;
|
|
29
|
+
customData?: Record<string, any>;
|
|
30
|
+
oneTime?: boolean;
|
|
27
31
|
}
|
|
28
32
|
export interface TaskExecution {
|
|
29
33
|
executionId: number;
|
|
@@ -33,6 +37,7 @@ export interface TaskExecution {
|
|
|
33
37
|
createdAt: Date;
|
|
34
38
|
content: TaskContent;
|
|
35
39
|
targetId?: number;
|
|
40
|
+
customData?: Record<string, any>;
|
|
36
41
|
}
|
|
37
42
|
export interface TaskResult {
|
|
38
43
|
executionId: number;
|
|
@@ -41,6 +46,7 @@ export interface TaskResult {
|
|
|
41
46
|
output?: any;
|
|
42
47
|
error?: string;
|
|
43
48
|
targetId?: number;
|
|
49
|
+
customData?: Record<string, any>;
|
|
44
50
|
}
|
|
45
51
|
export interface TargetTaskOverride {
|
|
46
52
|
id: number;
|