This is tomnomnom's tool gf so all credit goes to him, I just modified the code according to my requirements.
go install github.com/rix4uni/gf@latest
wget https://github.com/rix4uni/gf/releases/download/v0.0.1/gf-linux-amd64-0.0.1.tgz
tar -xvzf gf-linux-amd64-0.0.1.tgz
rm -rf gf-linux-amd64-0.0.1.tgz
mv gf ~/go/bin/gf
Or download binary release for your platform.
git clone --depth 1 github.com/rix4uni/gf.git
cd gf; go install
git clone https://github.com/rix4uni/gf-patterns.git ~/.garudrecon/.gf
Usage of gf:
-custom-path string
specify a custom pattern file path
-dump
prints the grep command rather than executing it
-list
list available patterns
-save
save a pattern (e.g: gf -save pat-name -Hnri 'search-pattern')
▶ cat urls.txt | gf xss
OR
▶ cat urls.txt | gf -custom-path ~/.garudrecon/.gf xss