Skip to content

freelabz/ph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Find patterns in raw data, easily.

ph (a.k.a pattern harvester) is CLI tool to quickly check for gf's style regexes in a set of input files.

InstallationGet StartedExamplesChangelogContributingLicense

Installation 📡

Using Go

go install -v github.com/freelabz/ph/cmd/ph@latest

Building from source

You need Go.

  • Linux

    • git clone https://github.com/freelabz/ph.git
    • cd ph
    • make 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.git
    • cd ph
    • .\make.bat windows (to install)
    • .\make.bat unwindows (to uninstall)

Get Started 🎉

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

Examples 💡

  • ph -h (Print the help)
  • ph -l (List available regexes)
  • ph -p xss,rce,lfi -f /path/to/files/*.txt (Run xss, rce, lfi regexes on )

Changelog 📌

Detailed changes for each release are documented in the release notes.

Contributing 🛠

Just open an issue/pull request.

Before opening a pull request, download golangci-lint and run

golangci-lint run

If there aren't errors, go ahead :)

License 📝

This repository is under GNU General Public License v3.0.
freelabz.com to contact us.

About

Pattern harvester

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors