GithubHelp home page GithubHelp logo

gitbrute's People

Contributors

bradfitz avatar cirosantilli avatar cyphar avatar jonathangawrych avatar rillig avatar sirlancelot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitbrute's Issues

Date replacement fails if timestamp changes length

See line

strconv.AppendInt(blob[:adatei], ad.n, 10)

This replaces the timestamps as decimal strings directly. If the number of digits in the unix timestamp changes during the brute-force attempt, this will incorrectly replace the string.

This is a minor issue, as it will only occur pre 2002 or in 2286. This would be especially applicable to #5 if git had been created back then.

git commit amend is a "porcelain" command

This means that it checks defaults and error conditions causing it to either fail itself or making gitbrute fail to generate the correct commit.

Examples:

  • If the existing commit has an empty commit message the commit fails and gitbrute throws away the error message (missing cmd.Stderr = os.Stderr line for the last bit)
  • The user details of the current user overwrite the user details in the commit giving the wrong commit if different.
  • Timezones !! (I think?)

I suggest using git hash-object -t commit -w --no-filters --stdin to create the commit object.

Then git update-ref refs/heads/gitbrute deadbeef26024c00b62f744f9dc0418c4ccd49b1 0000000000000000000000000000000000000000 to create a new branch (or error).

The first command generally never fails.
The second command will fail if the branch exists and you give it the zeros, but the commit still exists in the repository even then and the user can see it with git log deadbeef

This doesn't touch the work tree so it even works on a bare repository. Because of this you may also want to checkout the new branch afterwards. If you don't want to create a branch or it fails you can checkout the detached HEAD instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.