Skip to content

Cannot filter requests using capturing groups or advanced regex #1255

Open
@Udaykumar519

Description

@Udaykumar519

Hi,

we are using below version of gor replaying traffic
gor_1.3.3_x64.tar.gz

We are not able to correctly capture the requests based on the allow urls pattern

Command used:
sudo ./gor --input-raw :8985 --input-raw-bpf-filter "dst port 8985 and inbound" --http-allow-url="solr/im-search/select" --http-allow-url="route=(\bgshard(7|14)\b)(,(\bgshard(7|14)\b))*" --input-raw-allow-incomplete --input-raw-buffer-size 536870912 --output-http="http://testhost:port"

In above command we have added two allow url patterns, one of which pattern says to redirect urls which contains route parameter as follows
Allow: route=gshard7,gshard14 or route=gshard14,gshard7, here either of the pattern is valid

dont allow: route=gshard71,gshard141

So, We have added word boundaries for the same requirement

But the command is not capturing requests as expected

Doubt:

  1. can't we write regex on parameters of url?
  2. Can't we write multiple patterns of allow or disallow urls?

pls help

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about GoReplay and how to use it

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions