question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git-dumper doesn't work in some cases when the git output have HTML content-type

See original GitHub issue
  • I found a public git folder on some website. but during using git-dumper to dump the code out from the git folder i got these errors:
[-] Testing https://example.com/.git/HEAD [200]
[-] https://example.com//.git/HEAD responded with HTML
  • I checked the website manually and I can clearly see the git folder content is leaked. but git-dumper refuses to dump it since the data comming out from it is in HTML content-type. that will disallow git-dumper from dumping some cases.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DashLtcommented, May 15, 2021

Not every site has a <html> tag verbatim. Many have attributes inside the tag, e.g.:

<html class="rwd geo-override no-js vis no-rtl headerfooter-menu3 " lang="en">

It’s weird that whatever webserver in the site you’re attacking isn’t using the application/octet-stream content-type, but it exists so it’s definitely an edge case that has to be handled. As a quick and dirty thing you could check for the existence of <html, but even then that tag isn’t necessarily required. I think maybe some sort of HEAD file validation is in order?

1reaction
DEMON1Acommented, May 15, 2021

Yeah I already edited that line of code before. but the issue was still there. then i noticed there’s a second layer of validation on line 73 do the same thing as 33. edited it and now it’s working for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · arthaud/git-dumper - GitHub
Contribute to arthaud/git-dumper development by creating an account on GitHub. ... Git-dumper doesn't work in some cases when the git output have HTML...
Read more >
Not a git repository" when attempting to remote add a Git repo
You'll get this error if you try to use a Git command when your current working directory is not within a Git repository....
Read more >
Gathering some information from web exposed GIT repositories
Hello folks, Last week, while i was doing recon on some websites, i noticed that we can still found some versioning repositories in ......
Read more >
HTB: Cereal | 0xdf hacks stuff - GitLab
There I have access to a form that can submit cereal flavor requests. ... gitdumper.sh http://source.cereal.htb/.git/ source/ ...
Read more >
remove-section <name> git config [<file-option>] [--show-origin]
Output only the names of config variables for --list or --get-regexp . ... that may be used to browse HTML help (see -w...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found