tomnomnom / gf

A wrapper around grep, to help you grep for things
MIT License
1.77k stars 312 forks source link

no pattern match #56

Open khangaekata opened 3 years ago

khangaekata commented 3 years ago

Hello

Whenever I include gf in any one liner , I always get no pattern match error. I have given two one liners below where I am getting this error. gau $1 | gf lfi | qsreplace "/etc/passwd" | xargs -I % -P 25 sh -c 'curl -s "%" 2>&1 | grep -q "root:x" && echo "VULN! %"' export LHOST="http://localhost"; gau $1 | gf redirect | qsreplace "$LHOST" | xargs -I % -P 25 sh -c 'curl -Is "%" 2>&1 | grep -q "Location: $LHOST" && echo "VULN! %"'

Could you please tell me why it is happening ?

Best Regards,

Ashish

HetVikam commented 3 years ago

facing a similar issue, can someone help?

stlthwzrd commented 3 years ago

My findings:

When performing 'gf --list' I got no results and I found I did not have a ~/.gf directory. I searched and found the json pattern files here: /home/[username]/go/src/github.com/tomnomnom/gf/examples/

My fix: mkdir ~/.gf && cp /home/[username]/go/src/github.com/tomnomnom/gf/examples/* ~/.gf/

gf works as expected now.