Step 01: Check go lang version:
go versiongo install:
sudo apt - fix-broken install
sudo apt install gccgo-go
sudo apt install golang-goStep 02: Now we can install the GF tool via Go:
go install github.com/tomnomnom/gf@latestoptional:
go install github.com/tomnomnom/waybackurls@latestAfter installation, make sure Go's bin folder is in your PATH:
echo 'export PATH=$PATH:/home/usr_name/go/bin' >> ~/.zshrc
source ~/.zshrcor
echo 'export PATH=$PATH:/home/usr_name/go/bin' >> ~/.bashrc
source ~/.bashrcexample:
echo 'export PATH=$PATH:/home/hafiz/go/bin' >> ~/.zshrc
source ~/.zshrcStep 03:
Then download the different patterns to use with gf tool:
git clone https://github.com/NitinYadav00/gf-patterns.gitor
git clone https://github.com/Sherlock297/gf_patterns.gitStep 04:
mkdir -p ~/.gf
cd gf-PatternsNow copy all patterns to the .gf folder, which we had created above:
cp -r *.json ~/.gfMove downloaded gf tool and waybackurls in the bin folder for easy access:
cd go/bin
cp gf waybackurls /usr/bin/
cd ..
cd .gf
or
root pathThat's it. Installation is complete, you can check:
ls
gf -h
gf -listUsage Example:
waybackurls testphp.vulnweb.com | gf xss | tee xssfilter.txtUse GF with httpx or gau results:
cat find_urls.txt | gf xss | sort -u | tee final_output.txt
cat Find_urls.txt | gf sqli | sort -u | tee final_output.txtcount url:
wc -l xssfilter.txt
cat xssfilter.txtSimply use the below one-liner command :
go install github.com/tomnomnom/gf@latest && cp ~/go/bin/gf /usr/bin/ && gf -h && mkdir ~/.gf && git clone https://github.com/NitinYadav00/gf-patterns.git && cd gf_patterns/ && cp *.json ~/.gf && gf -list