News for hackers. Stuff that matters.
Re:Stripe CTF3: Distributed Systems is live by emillon on Thursday January 23, 2014 @01:35PM (#7110106)
It's not calling the git command that's problematic, it's calling an external command at all. So you pretty much have to recode the hot part in another language, where you just manipulate buffers instead of piping stuff around.
Re:Stripe CTF3: Distributed Systems is live by nayefc on Saturday January 25, 2014 @02:37PM (#7121989)
I did exactly that but my SHA-1 (in Ruby) is ending up different than Git's. Even weirder, when I take the header + body, and use an online SHA-1, I get a third and different value! (Not equal to git-hash-object nor to mine in Ruby). Is the body supposed to be modified to add LEDGER content?
Re:Stripe CTF3: Distributed Systems is live by grey-area on Sunday January 26, 2014 @05:41AM (#7124693)
Look again at Object Storage under the Git Objects link and you should get it, you're probably not quite matching what it does, it is a simple SHA1 so you're probably just missing one little part of the string to hash. You're on the right track - test getting the hashes to match first with git hash-object, but once you have done that you just need to solve it faster and recover when you discover that someone else got there first.

It is possible in ruby, that's what I used first, though the ref implementation is in ruby, so a single process may not cut it unless you are lucky. Keep trying too if you are solving it but not quite making it in time as you're competing against a variable time to complete on the other side.

Re:Stripe CTF3: Distributed Systems is live by fragmede on Saturday January 25, 2014 @09:17PM (#7123506)
do you have 'commit $body.length\0'?
Re:Stripe CTF3: Distributed Systems is live by apgwoz on Tuesday January 28, 2014 @04:49PM (#7139998)
This was the part that I stumbled on for a few hours late at night and kept me up. Next morning, when investigating what git hash-object did, it was obvious. should have just went to sleep.