Giter Club home page Giter Club logo

ctf-j-server's Introduction

Jeopardy CTF 서버

설치 방법

소스코드를 클론합니다.

서버

git clone https://github.com/PENEKhun/CTF-J-Server.git

클라이언트

git clone https://github.com/hnsoo/yisf-client

설정파일을 생성합니다.

cd CTF-J-Server
vi application.yml
spring:
  profiles:
    active: prod
  mvc:
    favicon:
      enabled: false
  pathmatch:
    matching-strategy: ant-path-matcher
  jpa:
    database-platform: com.penekhun.ctfjserver.Config.CustomMysqlDialect
    hibernate:
      ddl-auto: none
      naming:
        physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
      format_sql: false
      use_sql_comment: false
    show-sql: false
  redis:
    host: localhost
    port: 6379
    password:
  # file upload max size (파일 업로드 크기 설정)
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB

server:
  port: 8080
  enable-open-timer: false
  time-zone: Asia/Seoul
  open-time-format: "yyyy-MM-dd HH:mm:ss"
  open-time: "0000-00-00 00:00:00"
  end-time-format: "yyyy-MM-dd HH:mm:ss"
  end-time: "0000-00-00 00:00:00"

jwt:
  header: Authorization
  secret: {jwt secret}
  token-validity-in-seconds: 1800 # 30분
  refresh-token-validity-in-seconds: 10800 # 3시간

header:
  access: "Authorization"
  refresh: "Refresh"

# AWS Account Credentials (AWS 접근 키)
cloud:
  aws:
    credentials:
      accessKey: {access key}
      secretKey: {secret key}
    s3:
      bucket: {bucket name}
    region:
      static: {aws region}
    stack:
      auto: false

springdoc:
  default-produces-media-type: application/json
  default-consumes-media-type: application/x-www-form-urlencoded

---

spring:
  config:
    activate:
      on-profile: "prod"
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: "jdbc:mysql://실제환경-mysql-데이터베이스-주소/스키마?zeroDateTimeBehavior=convertToNull"
    username: ""
    password: ""
  redis:
    host: "실제환경-redis-host"
    port: "6379"
    password: ""

---

spring:
  config:
    activate:
      on-profile: "dev"
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: "jdbc:mysql://실제환경-데이터베이스-주소/스키마?zeroDateTimeBehavior=convertToNull"
    port: 3306
    username: ""
    password: ""
  redis:
    host: "개발환경-redis-host"
    port: 6379
    password: """

필수 설정값을 기입합니다.

  • 실제 환경 mysql 연결 정보
  • 실제 환경 redis 연결 정보
  • 개발 환경 mysql 연결 정보
  • 실제 환경 redis 연결 정보
  • aws bucket 연결 정보
  • jwt secret key

클라이언트를 구동합니다.

https://github.com/hnsoo/yisf-client/blob/master/README.md

서버를 구동합니다.

./gradlew bootRun

이럴때 사용합니다.

  • 폐쇠적인 온라인 CTF 대회를 운영할때

ctf-j-server's People

Contributors

penekhun avatar

Watchers

 avatar

ctf-j-server's Issues

[Bug] 동점시 순위산정 버그

A와 B가 점수가 동점일때,
현재는 이 둘의 순위가 랜덤하게 산정됩니다.
순위를 Last Auth Time기준으로 책정되겠끔 바꿔야합니다.

case)

who. score. Last Auth Timestamp
A - 100점 - 2022.05.23 12:33:55
B - 100점 - 2022.05.22 22:05:36

-> B가 A보다 더 높은 순위

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.