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 , ฯลฯ );refs/heads/master , refs/remotes/origin/HEAD , ฯลฯ ) โดยการวิเคราะห์ .git/HEAD , .git/logs/HEAD , .git/config , .git/packed-refs และอื่น ๆ ;.git/packed-refs , .git/index , .git/refs/* และ .git/logs/* ;git checkout . เพื่อกู้คืนต้นไม้ทำงานปัจจุบัน