Skip to content

TaiwanSecurityClub/InstancerAPI

 
 

Repository files navigation

InstancerAPI

Run

  1. Edit docker-compose.yml
volumes:
- ./chal:/app/chal:ro
environment:
- PORT=8000
- TOKEN=testtoken
# Instance port range
- MINPORT=30000
- MAXPORT=31000
# Instance Validity
- VALIDITY=3m
- FLAGPREFIX=TSC
- FLAGMSG=testflag
# Instance subnet prefix
- PREFIX=29
# Instance subnet pool
- SUBNETPOOL=10.200.0.0/16
# Challenge Dir
- CHALDIR=chal
- BASESCHEME=http
# Base host name. For example use aaa.com you will get <id>.aaa.com for instance host
- BASEHOST=
# Access mode: Proxy, Forward, Command
- MODE0=Proxy
# For Command mode
- COMMAND0=nc {{ .BaseHost }} {{ .Port }}
ports:
# Same as PORT environment
- 8000:8000
  1. Move your challenge to CHALDIR

  2. Challenge docker-compose.yml example

version: '3'
services:
  chal:
    image: chal
    build: .
    ports:
    # Instancer will use ${PORT0} to control your port
    - ${PORT0}:11111
    environment:
    - FLAG=${FLAG}
    volumes:
    - /tmp/${ID}/userid:/userid:ro
    - /tmp/${ID}/flag:/flag:ro
    networks:
      default:

networks:
  default:
    ipam:
      config:
      # Instancer will use ${SUBNET<Number>} to control your subnet
      - subnet: ${SUBNET0}
  1. Run docker compose up -d and wait for 2 minute

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 89.2%
  • Makefile 4.9%
  • Shell 3.4%
  • Dockerfile 2.5%