https://github.com/mmpx12/xgit
Fast scanner for exposed git repositories.
https://github.com/mmpx12/xgit
exposed git golang leak pentest pentest-tool recon scanner termux termux-tool
Last synced: 5 months ago
JSON representation
Fast scanner for exposed git repositories.
- Host: GitHub
- URL: https://github.com/mmpx12/xgit
- Owner: mmpx12
- Created: 2022-09-03T21:23:44.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T11:50:22.000Z (over 3 years ago)
- Last Synced: 2024-06-21T09:40:45.399Z (almost 2 years ago)
- Topics: exposed, git, golang, leak, pentest, pentest-tool, recon, scanner, termux, termux-tool
- Language: Go
- Homepage:
- Size: 189 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# X-GIT

Scan for exposed git repositories.
## Usage:
```
-h, --help Show this help
-t, --thread NBR Number of threads (default 50)
-o, --output FILE Output file (default found_git.txt)
-d, --check-date DATE Only repo after date (mm-dd-yyyy, yyyy, mm-yyyy)
-i, --input FILE Input file
-k, --insecure Ignore certificate errors
-T, --timeout SEC Set timeout (default 5s)
-u, --user-agent USR-AGENT Set user agent
-p, --proxy PROXY Use proxy (proto://ip:port)
-V, --version Print version and exit
```
## Examples:
```sh
$ xgit -i top-alexa.txt
$ xgit -i top-alexa.txt -k -d 2021
$ xgit -p socks5://127.0.0.1:9050 -o good.txt -i top-alexa.txt -t 60
```
**Example of input file:**
```
google.com
github.com
domain.com/code
```
**note:** domain in list shouldn't have protocol in them:
```go
req, err := http.NewRequest("GET", "https://"+url+"/.git/", nil)
```
#### OUTPUT FILE:
Urls with `[nd] ` prefix are exposed git repository but without directory listing.
#### STDOUT
In stdout urls in cyan are git repository where directory listing is enable and yellow ones are when directory listing is disable.
#### WARNING
Do not use too much threads or you will DOS yourself.
## Install:
With one liner if **$GOROOT/bin/** is in **$PATH**:
```sh
go install github.com/mmpx12/xgit@latest
```
or from source with:
```sh
git clone https://github.com/mmpx12/xgit.git
cd xgit
make
sudo make install
# or
sudo make all
```
for **termux** you can do:
```sh
git clone https://github.com/mmpx12/xgit.git
cd xgit
make
make termux-install
# or
make termux-all
```
There is also prebuild binaries [here](https://github.com/mmpx12/xgit/releases/latest).