tomnomnom / gf

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

"no such pattern" error when executing under sudo #55

Open storenth opened 3 years ago

storenth commented 3 years ago

Unexpected error while executing something like echo $string | gf urls as part of the bash script that need sudo privileges (e.g. massdns). The simplest example would be:

Снимок экрана 2021-02-15 в 15 02 28
Archx0Mas commented 3 years ago

Me too , as i have installed the gf tool and then when i type on terminal gf it shows : no such pattern , if i type gf -list it shows the examples , so i cannot use the tool , its a bug or the problem of parrot systems maybe

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.

jiggleexe commented 2 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.

Thnx worked :)

Archx0Mas commented 2 years ago

Well , i remember that i found a problem i had got another gf and was not full downloaded , but anyway a fixed it a long time ago

garthhumphreys commented 2 years ago

A quick way to find the path to the examples folder is to do a find:

sudo find / -type d -name "tomnomnom"

Once I found the path I followed the rest of the steps that @stlthwzrd outlined :)

0xkrnn commented 2 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.

This is also not working... again it shows no such pattern

babatunde-ayoade commented 1 year ago

@Karan4580

Try this :

git clone https://github.com/1ndianl33t/Gf-Patterns mkdir .gf mv ~/Gf-Patterns/*.json ~/.gf

Archx0Mas commented 1 year ago

Thnx but i have fixed it

Sent from Proton Mail mobile

-------- Original Message -------- On Nov 23, 2022, 2:45 PM, babatunde-ayoade wrote:

@.***(https://github.com/Karan4580)

Try this :

git clone https://github.com/1ndianl33t/Gf-Patterns mkdir .gf mv ~/Gf-Patterns/*.json ~/.gf

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>