Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomnomnom/qsreplace
Accept URLs on stdin, replace all query string values with a user-supplied value
https://github.com/tomnomnom/qsreplace
Last synced: 3 days ago
JSON representation
Accept URLs on stdin, replace all query string values with a user-supplied value
- Host: GitHub
- URL: https://github.com/tomnomnom/qsreplace
- Owner: tomnomnom
- License: mit
- Created: 2019-10-15T09:01:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-23T15:42:28.000Z (about 2 years ago)
- Last Synced: 2024-10-14T11:12:52.868Z (about 2 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 755
- Watchers: 19
- Forks: 123
- Open Issues: 15
-
Metadata Files:
- Readme: README.mkd
- License: LICENSE
Awesome Lists containing this project
- awesome-bugbounty-tools - qsreplace - Accept URLs on stdin, replace all query string values with a user-supplied value (Miscellaneous / Useful)
- WebHackersWeapons - qsreplace - supplied value |![](https://img.shields.io/github/stars/tomnomnom/qsreplace?label=%20)||![linux](/images/linux.png)![macos](/images/apple.png)![windows](/images/windows.png)[![Go](/images/go.png)](/categorize/langs/Go.md)| (Weapons / Tools)
- awesome-hacking-lists - tomnomnom/qsreplace - Accept URLs on stdin, replace all query string values with a user-supplied value (Go)
README
# qsreplace
Accept URLs on stdin, replace all query string values with a user-supplied value, only output
each combination of query string parameters once per host and path.## Usage
Example input file:
```
▶ cat urls.txt
https://example.com/path?one=1&two=2
https://example.com/path?two=2&one=1
https://example.com/pathtwo?two=2&one=1
https://example.net/a/path?two=2&one=1
```### Replace Query String Values
```
▶ cat urls.txt | qsreplace newval
https://example.com/path?one=newval&two=newval
https://example.com/pathtwo?one=newval&two=newval
https://example.net/a/path?one=newval&two=newval
```### Append to Query String Values
```
▶ cat urls.txt | qsreplace -a newval
https://example.com/path?one=1newval&two=2newval
https://example.com/pathtwo?one=1newval&two=2newval
https://example.net/a/path?one=1newval&two=2newval
```### Remove Duplicate URL and Parameter Combinations
You can omit the argument to `-a` to only output each combination of URL and query string parameters once:
```
▶ cat urls.txt | qsreplace -a
https://example.com/path?one=1&two=2
https://example.com/pathtwo?one=1&two=2
https://example.net/a/path?one=1&two=2
```## Install
With Go:
```
▶ go install github.com/tomnomnom/qsreplace@latest
```Or [download a release](https://github.com/tomnomnom/qsreplace/releases) and put it somewhere in your `$PATH`
(e.g. in /usr/local/bin).