ph (a.k.a pattern harvester) is CLI tool to quickly check for gf's style regexes in a set of input files.
Installation • Get Started • Examples • Changelog • Contributing • License
go install -v github.com/freelabz/ph/cmd/ph@latestYou need Go.
-
Linux
git clone https://github.com/freelabz/ph.gitcd phmake linux(to install)make unlinux(to uninstall)
Or in one line:
git clone https://github.com/freelabz/ph.git; cd ph; go get; make linux -
Windows (executable works only in ph folder.)
git clone https://github.com/freelabz/ph.gitcd ph.\make.bat windows(to install).\make.bat unwindows(to uninstall)
ph -h prints the help.
Usage of ph:
-debug
Enable debug mode
-f string
Comma-separated list of files to analyze
-jsonl
Output JSON lines
-l string
File containing file paths
-list
List available patterns
-p string
Names of the patterns to use
-pdir string
Comma-separated list of directories containing regex JSON files (default "/home/osboxes/.gf")
-sc
Show regex config in JSON
ph -h(Print the help)ph -l(List available regexes)ph -p xss,rce,lfi -f /path/to/files/*.txt(Runxss,rce,lfiregexes on )
Detailed changes for each release are documented in the release notes.
Just open an issue/pull request.
Before opening a pull request, download golangci-lint and run
golangci-lint runIf there aren't errors, go ahead :)
This repository is under GNU General Public License v3.0.
freelabz.com to contact us.
