Skip to content

Commit adb3858

Browse files
committedFeb 25, 2025
Refactor screenshot rule to remove duplication
1 parent 4cd4879 commit adb3858

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed
 

‎collection/screenshot/capture-screenshot.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ rule:
2222
- de5f2dd641b3e75eea6e4575b0ba4a48:0x140002180
2323
features:
2424
# Classic GDI Capture
25-
- or:
25+
26+
- or:
2627
- and:
2728
- or:
2829
- api: user32.GetWindowDC
2930
- api: user32.GetDC
3031
- and:
3132
- api: gdi32.CreateDC
32-
- string: "DISPLAY"
33+
- optional:
34+
- string: "DISPLAY"
3335
- or:
3436
- api: gdi32.BitBlt
3537
- api: gdi32.GetDIBits
@@ -47,26 +49,18 @@ rule:
4749
- and:
4850
- api: BitBlt
4951
- api: System.Drawing.Graphics::CopyFromScreen
50-
5152
- and:
52-
- or:
53-
- api: "GetDC"
54-
- and:
55-
- api: "CreateDC"
56-
- optional:
57-
- string: "DISPLAY"
5853
- or:
5954
- and:
6055
- api: "SelectObject"
6156
- api: "DrawText"
6257
- and:
63-
- api: "CreateCompatibleDC"
64-
- api: "CreateCompatibleBitmap"
6558
- or:
6659
- api: "BitBlt"
6760
- api: "StretchBlt"
6861
- api: "PrintWindow"
6962

63+
7064
# GDI+ Graphics API chain
7165
- and:
7266
- api: "GdipCreateBitmapFromScan0"

0 commit comments

Comments
 (0)