{"id":13542318,"url":"https://github.com/digininja/GitHunter","last_synced_at":"2025-04-02T10:30:39.058Z","repository":{"id":144269270,"uuid":"199662478","full_name":"digininja/GitHunter","owner":"digininja","description":"A tool for searching a Git repository for interesting content","archived":false,"fork":false,"pushed_at":"2023-12-18T23:21:43.000Z","size":60,"stargazers_count":102,"open_issues_count":3,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-20T00:25:22.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digininja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-30T13:58:46.000Z","updated_at":"2025-03-06T17:12:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3b0e9d9-cec8-4a77-ba8b-3695a151fb18","html_url":"https://github.com/digininja/GitHunter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digininja%2FGitHunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digininja%2FGitHunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digininja%2FGitHunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digininja%2FGitHunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digininja","download_url":"https://codeload.github.com/digininja/GitHunter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796744,"owners_count":20835438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T10:01:04.780Z","updated_at":"2025-04-02T10:30:38.734Z","avatar_url":"https://github.com/digininja.png","language":"Go","funding_links":[],"categories":["Miscellaneous","Go (531)","Go"],"sub_categories":["Git"],"readme":"# GitHunter\nEvery now and then, on an internal test, you'll land on a box with a Git repository already checked out into directory. GitHunter will help you search that repository for anything juicy which could help you with other areas of your test.\n\nGitHunter looks for:\n* Keywords in commit messages\n* Keywords in files\n* Interesting file names\n\nThanks to [@michenriksen](https://github.com/michenriksen/) for allowing me to include his existing [Gitrob](https://github.com/michenriksen/gitrob) signatures for doing the file name checks.\n\nFor the two keyword checks, the script uses a customisable JSON file to allow you to do either simple or regular expressesion searches, meaning you can target the discovery to your client's environment.\n\n## Installation\nThese instructions aren't best practice, ideally you would install this with `go install...` but as far as I can tell this will only install the binary. I also need to install the `patterns.json` file somewhere so it can be used by the app and edited by users, so this is the best I can come up with for now. Any suggestions, let me know.\n\n1. [Set up your Go environment.](https://golang.org/doc/install)\n2. Change into the Go source directory:\n   ```\n   cd ~go/src/github.com\n   ```\n1. Make a directory for me and go into it:\n   ```\n   mkdir digininja ; cd digininja\n   ```\n1. Clone the project:\n   ```\n   git clone https://github.com/digininja/GitHunter.git\n   ```\n1. Change into the project directory:\n   ```\n   cd GitHunter/\n   ```\n1. Build it:\n   ```\n   go build\n   ```\n\nYou should now have a binary in the current directory.\n\n## Usage\nUsage is fairly simple, by default, GitHunter will look in the current directory for a `.git` directory and, if it finds one, will parse through it and show anything interesting it finds in either filenames or in commit comments. You can specify a different directory for the repository with the `-gitdir` parameter.\n\nIf you want to expand what is searched to include file contents at each commit, you can add the `-grep` parameter, but be warned, git, on my box at least, runs single threaded, and can take a long time to do the grepping on a large repository. It actually failed trying to grep through Metasploit, due to the sheer number of commits and content. Still worth trying it though, especially on smaller repos, as you may find something.\n\nIf you want a dump of the commit logs, without any commentary, then you can use the `-dump` parameter.\n\nTo specify a custom patterns file, use `-patterns` and to have the output without any fancy colours (easier for parsing) use `-nocolours`.\n\n## Testing things out\nIf you want a repository to test things on, have a look at my [Leaky Repo](https://github.com/digininja/leakyrepo) which contains quite a few interesting things to find.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigininja%2FGitHunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigininja%2FGitHunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigininja%2FGitHunter/lists"}