bambi6-service-postit

Simple Note-Taking A/D Service for BambiCTF6 in 2021
git clone https://git.sinitax.com/sinitax/bambi6-service-postit
Log | Files | Refs | README | LICENSE | sfeed.txt

entrypoint.sh (570B)


      1#!/bin/bash
      2
      3set -e
      4
      5env
      6
      7python3 -c '
      8from Crypto.PublicKey import RSA
      9from sys import argv
     10from os import environ, listdir
     11
     12# use less keys for ci runner
     13count = 30 if environ.get("CI_RUNNER") == "1" else 500
     14
     15files = listdir("keys")
     16for i in range(len(files), count):
     17    with open(f"keys/{i}.rsa", "w+") as f:
     18        print(f"Generating key {i+1}/{count}", flush=True)
     19        rsa = RSA.generate(1024, e=3)
     20        f.write(f"{rsa.e} {rsa.d} {rsa.n}")
     21print(f"{count} keys available.", flush=True)
     22'
     23
     24/home/checker/.local/bin/gunicorn -c gunicorn.conf.py checker:app