Code Monkey home page Code Monkey logo

htc-api's Introduction

Vortex Hunt The Code 2022 - API

Previosuly users were provided the files which was risky since users can resort to malpractices such as decompilation and bruteforcing to get the actual algorithm.

This API is used to execute those binary files remotely. The users now provide inputs through input.py for a particular question and the input/output exachange is carried out via HTTP requests.

Moreover there is IP based rate limiting to prevent users from bruteforcing the endpoint.

Setup instructions

  • Copy the following files:

    • assets/config.json.example to assets/config.json
    • assets/error.log.example to assets/error.log
    • .env.example to .env
  • Mention question_name: executable_name settings in assets/config.json.

  • Fill up the following values in .env:

    • HTC_USER: default user in the service container (your choice)
    • HTC_API_PORT: port number of the service container on which the flask app is served (your choice)
    • MAX_REQ_RATE: maximum number of execution requests allowed per IP address
  • Any modifications in api.py will be reflected automatically.

  • The following files can be modified in realtime:

    • assets/config.json
    • assets/error.log
  • C and C++ source files can added/updated/removed from assets/src in realtime. Just execute assets/compile.sh after any change.

  • Binary files can be added/updated/removed from assets/binary in realtime.

  • input.py makes API calls. Change apiUrl and accordingly.

  • Run sudo docker-compose up.

Go hunt it!

htc-api's People

Contributors

goyalanurag avatar

Watchers

 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.