Skip to content

Instantly share code, notes, and snippets.

@ajdumanhug
Forked from int0x80/Git Creds.md
Created May 2, 2021 17:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ajdumanhug/b68337ab6b6b5f884a831657de8121cd to your computer and use it in GitHub Desktop.

Finding creds in git repos is awesome.

$ for commit in $(seq 1 $(git reflog | wc -l)); do git diff HEAD@{$commit} 2>/dev/null | grep password; done
-spring.datasource.password=g!'301T%y%xT@uL`
+spring.datasource.password=4AT&G;[H@&'\^uDK
-spring.datasource.password=UmAnR=-v|{2=gyx?
+spring.datasource.password=4AT&G;[H@&'\^uDK
...

I do this as a double-check alongside running tools like gitrob and gitleaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment