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/packed-refs等,以查找尽可能多的参考(例如refs/heads/master , refs/remotes/origin/HEAD .git/config promots/orient/head等);.git/packed-refs , .git/index , .git/refs/* and .git/logs/*来查找尽可能多的对象(SHA1)。git checkout .恢复当前的工作树