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

Cannot filter requests using capturing groups or advanced regex #1255

Open
Udaykumar519 opened this issue Jul 24, 2024 · 1 comment
Open
Labels
question Question about GoReplay and how to use it

Comments

@Udaykumar519
Copy link

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

@dosubot dosubot bot added the question Question about GoReplay and how to use it label Jul 24, 2024
@Udaykumar519
Copy link
Author

@buger any help or suggestions here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about GoReplay and how to use it
Projects
None yet
Development

No branches or pull requests

1 participant