Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Screenshot Detection by Modifying capture-screenshot.yml #1007

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

akh7177
Copy link

@akh7177 akh7177 commented Feb 24, 2025

Added GDI, GDIP, and DirectX API calls to improve detection accuracy for various screenshot capture methods.

This detects screenshot capture that uses GDI+ routines as well as CreateDC with other arguments along with DISPLAY. The test files include two executables that demonstrate the improved detection.

closes#981

akh7177 and others added 2 commits February 24, 2025 22:08
Improve Screenshot Detection by Modifying capture-screenshot.yml
Comment on lines 51 to 68
- and:
- or:
- api: "GetDC"
- and:
- api: "CreateDC"
- optional:
- string: "DISPLAY"
- or:
- and:
- api: "SelectObject"
- api: "DrawText"
- and:
- api: "CreateCompatibleDC"
- api: "CreateCompatibleBitmap"
- or:
- api: "BitBlt"
- api: "StretchBlt"
- api: "PrintWindow"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of this seems to be duplicated from above, right? would you please merge the logic where reasonable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @williballenthin ,

I've tried to remove the duplicated parts of the code and committed the changes. Please let me know if further improvements are required.

@akh7177 akh7177 force-pushed the add-screenshot-rule branch from adb3858 to 4cd4879 Compare February 25, 2025 19:19
@akh7177 akh7177 force-pushed the add-screenshot-rule branch from 9fe63a9 to ea56ada Compare February 26, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants