git dumper
Release 1.0.8
웹 사이트에서 git 저장소를 버리는 도구.
이것은 PIP로 쉽게 설치할 수 있습니다.
pip install git-dumper
usage: git-dumper [options] URL DIR
Dump a git repository from a website.
positional arguments:
URL url
DIR output directory
optional arguments:
-h, --help show this help message and exit
--proxy PROXY use the specified proxy
-j JOBS, --jobs JOBS number of simultaneous requests
-r RETRY, --retry RETRY
number of request attempts before giving up
-t TIMEOUT, --timeout TIMEOUT
maximum time in seconds before giving up
-u USER_AGENT, --user-agent USER_AGENT
user-agent to use for requests
-H HEADER, --header HEADER
additional http headers, e.g `NAME=VALUE`
--client-cert-p12 CLIENT_CERT_P12
client certificate in PKCS#12 format
--client-cert-p12-password CLIENT_CERT_P12_PASSWORD
password for the client certificate
git-dumper http://website.com/.git ~/website
이 소프트웨어를 자신의 위험으로 사용하십시오!
다운로드중인 저장소가 공격자가 제어하는 경우 컴퓨터에서 원격 코드 실행이 발생할 수 있음을 알아야합니다.
PIP로 종속성을 설치하기 만하면됩니다.
pip install -r requirements.txt
그런 다음 간단히 사용하십시오.
./git_dumper.py http://website.com/.git ~/website
이 도구는 먼저 디렉토리 목록을 사용할 수 있는지 확인합니다. 그렇다면 .git 디렉토리 ( wget 로 수행 할 작업)를 재귀 적으로 다운로드합니다.
디렉토리 목록을 사용할 수없는 경우 가능한 한 많은 파일을 찾기 위해 몇 가지 방법을 사용합니다. 단계별로 Git-Dumper는 다음과 같습니다.
.gitignore , .git/HEAD , .git/index 등);.git/HEAD , .git/logs/HEAD , .git/config , .git/packed-refs 등을 분석하여 가능한 한 많은 심판을 찾으십시오 (예 : refs/heads/master , refs/remotes/origin/HEAD 등);.git/packed-refs , .git/index , .git/refs/* 및 .git/logs/* ;git checkout . 현재 작업 트리를 복구합니다