Skip to content

Filtering

SMJSGaming edited this page Aug 5, 2024 · 2 revisions

Filtering

GDIntercept allows you to filter requests and responses with a set of options to make your event listeners more specific. This is done by using the RequestFilter and ResponseFilter classes in the event listener constructors.

Origin Filter

GDIntercept has a few origins it recognizes, these are:

RequestFilter(OriginFilter::GD_FILTER)
ResponseFilter(OriginFilter::GD_CDN_FILTER)

URL Filter

You can also filter requests based on a part of the URL (excluding the query string). This is done by giving a string vector to the filter constructor:

// Possible URLs:
// https://www.boomlings.com/database/getGJLevels21.php
// https://geometrydash.com/index.php
RequestFilter({"boomlings.com/database", "geometrydash.com"})
// Possible URLs:
// https://boomlings.com/database/accounts/loginGJAccount.php
ResponseFilter({"https://boomlings.com/database"})

Node Listener Filter

Node listeners require the filter to be provided in the template arg. As a result, the last parameters of the this->template addEventListener functions are the filters constructor parameters:

// The filter parameter is optional, otherwise it can be filled in with any of the standard parameters
this->template addEventListener<RequestFilter>([=](const RequestEvent* event) {
    // ...
}, OriginFilter::ALL_FILTER);

Clone this wiki locally