download-git

To download .git directory from victim's website.

Usage no npm install needed!

<script type="module">
  import downloadGit from 'https://cdn.skypack.dev/download-git';
</script>

README

Download .git

  • npm install download-git

Download a whole .git

    downloadGit http://xxx.com.tw/.git

download one git object id

    downloadGit http://xxx.com.tw/.git a4bbcd16a46d691e5053e50387258b7b8e918601

This is a tool to download source code someone release the directory .git on the his website.

development

  1. Get config, description, ORIG_HEAD, index, HEAD, refs/heads/master
  2. Get a object id from refs/heads/master.
  3. Download this object id, it will also give us a new tree id and parent id.
  4. Recuresively download the tree id and parent id.