tomnomnom / qsreplace

Accept URLs on stdin, replace all query string values with a user-supplied value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There's no way to target specific params

tomnomnom opened this issue · comments

Copy+paste from Slack convo:

I've got a few ideas to make it more useful
Mostly, match (with regex) the param name or the value to replace

So you could, for example, do something like cat urls.txt | qsreplace --match-value='^https?://' https://lksjdklsdg.burpcollab or something like that

or cat urls.txt | qsreplace --match-key='.*redirect.*' //evil.com

Or cat urls.txt | qsreplace --match-value='[0-9]+' -a '+sleep(1)'

A simpler idea is to have an option to replace to parameters one-by-one instead of all at once. Sometimes a url will have X parameters and some of them are critical to get a proper response.
For example:

echo 'https://example.com/path?one=1&two=2' | qsreplace newval
https://example.com/path?one=newval&two=2
https://example.com/path?one=1&two=newval

Just realized this should probably go into a separate issue =]