Skip to content

Instantly share code, notes, and snippets.

@fuckup1337
Forked from int0x80/Git Creds.md
Created January 8, 2021 00:59
Show Gist options
  • Save fuckup1337/f8001eb0d80dfeb5b243858dec35857e to your computer and use it in GitHub Desktop.
Save fuckup1337/f8001eb0d80dfeb5b243858dec35857e 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