-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.yaml
More file actions
47 lines (39 loc) · 1.79 KB
/
Copy pathtasks.yaml
File metadata and controls
47 lines (39 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
tasks:
# Simple tasks
- cmdline: "whoami"
expected: "localuser"
# Use expected to match only the fragment you care about
- cmdline: "dir C:\\Users\\kali\\test"
expected: Kharon.x64.exe
# Or use multiline to match the entire thing
- cmdline: "dir C:\\Users\\kali\\test"
expected: |
C:\Users\kali\test
Contents of C:\Users\kali\test\*:
04/19/2026 16:59 <dir> .
04/19/2026 16:59 <dir> ..
04/16/2026 22:43 75776 Kharon.x64.exe
75776 Total File Size for 1 File(s)
2 Dir(s)
# ── Error handling ────────────────────────────────────────────────
# Unknown commands are rejected at dispatch (ok=false from server).
- cmdline: "xyzzy frobnicate"
expected: "will never succeed"
allowed_to_fail: true
# BOF with a nonexistent file is rejected at dispatch.
- cmdline: "bof /tmp/nonexistent.o"
allowed_to_fail: true
# ── Regex and negative matching ───────────────────────────────────────
# Regex match — case-sensitive; use (?i) prefix for case-insensitive
# - cmdline: "whoami"
# expected_regex: "(?i)^.*user.*$"
# Negative match — assert a substring is NOT in the output
# - cmdline: "whoami"
# not_expected: "error"
# Negative regex — assert a pattern does NOT match
# - cmdline: "whoami"
# not_expected_regex: "(?i)access.denied|permission.denied"
# Combined — all specified assertions must pass
# - cmdline: "whoami"
# expected: "user"
# not_expected_regex: "(?i)access.denied|error"