# git repo analysis

NOTE: if there is a `.git` directory, the master directory is a git repository.

## GitTools

### Finder

Find websites that expose `.git` publicly

```bash
gitfinder.py -i URL.txt -t [THREADS]
```

### DUMPER

Having known a `.git` directory exists, this tool can download the files related to the git-repo.

```bash
gitdumper.sh http://IP/PATH/.git/ FOLDER_NAME
```

### EXTRACTOR

**NOTE: if kali setup is `kashz-kali`; filename is `gitextractor.sh`**

When `gitdumper.py` downloads incomplete git repositories, this tool can be used to restore contents. The tool reads the `.git/` and creates a new directory where the extracted files are saved.

```bash
extractor.sh FOLDER_NAME_CONTAINING_.git SOURCE_CODE_DIR

# only for kashz-kali
gitextractor.sh FOLDER_NAME_CONTAINING_.git SOURCE_CODE_DIR
```

## Reference

* [internetwache/GitTools](https://github.com/internetwache/GitTools)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kashz.gitbook.io/kashz-jewels/tricks/git-repo-analysis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
