Coder Social home page Coder Social logo

stripe-ctf3's Introduction

Stripe CTF3 Solutions

My solutions for Stripe's Capture the Flag. The resulting scores are here. Here is a brief description of how each solution works:

level 0

Simply using a Ruby set to store the dictionary is enough to clear this level. Lots of optimizations are possible - for e.g. loading an offline-generated dictionary index.

level 1

Modified the supplied miner script to fork a python script to do the hashing. The Python script (gitcoin-miner.py) uses the multiprocessing module to parallelize hashing.

level 2

Simply allowing one concurrent connection at a time from each unique IP address was good enough to block most elephants. This is an interesting problem but sadly I didn't have enough time to work on it!

level 3

I spent a fair amount of time trying different indexes to improve my score. However, the first two simple changes I made gave me the best score:

  1. Shard the index across the servers based on document id.
  2. Instead of reading files from disk at query time, build a line-based in memory index.

level 4

This was the most painful level to get working and there is a fair bunch of copy-paste code. These were the major changes:

  1. Integrate the goraft library by following the raftd reference implementation.
  2. Change the provide solution to use unix transport instead of http.
  3. Implement leader forwarding to route queries to the current leader.
  4. Use an in-memory sqlite for the database to speed up queries/updates.

stripe-ctf3's People

Watchers

 avatar  avatar

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.