Found {flagCount} flags
; 8 | 9 | export default FlagCounter; 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16 2 | 3 | WORKDIR /usr/src/app 4 | 5 | ADD ./package.json . 6 | ADD ./package-lock.json . 7 | 8 | RUN npm i 9 | 10 | RUN npx next telemetry disable 11 | 12 | ADD . . 13 | RUN npm run build 14 | 15 | ENV NODE_ENV production 16 | RUN npm prune --production 17 | 18 | EXPOSE 3000 19 | 20 | CMD [ "npm", "start" ] 21 | -------------------------------------------------------------------------------- /game-archive/http/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "game", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "UNLICENSED", 11 | "dependencies": { 12 | "got": "^11.8.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/next/lib/types.ts: -------------------------------------------------------------------------------- 1 | export type SearchParams = { 2 | sploit: string; 3 | team: string; 4 | status: string; 5 | flag: string; 6 | since: string; 7 | until: string; 8 | checksystem_response: string; 9 | }; 10 | 11 | export type SearchValues = { sploits: string[]; teams: string[]; statuses: string[] }; 12 | 13 | export type GameInfo = { flagFormat: string }; 14 | -------------------------------------------------------------------------------- /src/api/graphql-schema.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | import { buildSchema } from 'type-graphql'; 3 | import resolvers from '../lib/resolvers'; 4 | 5 | const makeSchema = async () => { 6 | return await buildSchema({ 7 | resolvers, 8 | emitSchemaFile: { 9 | path: path.join(__dirname, '../../schema.gql'), 10 | commentDescriptions: true 11 | } 12 | }); 13 | }; 14 | 15 | export { makeSchema }; 16 | -------------------------------------------------------------------------------- /src/next/components/navBar.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | class NavBar extends Component { 4 | render() { 5 | return ( 6 | 10 | ); 11 | } 12 | } 13 | 14 | export default NavBar; 15 | -------------------------------------------------------------------------------- /src/lib/db-healthcheck.ts: -------------------------------------------------------------------------------- 1 | require('dotenv').config(); 2 | 3 | import { Sequelize } from 'sequelize'; 4 | 5 | export default async () => { 6 | const sequelize = new Sequelize({ 7 | database: process.env.DB_NAME!, 8 | username: process.env.DB_USER!, 9 | password: process.env.DB_PASS, 10 | host: process.env.DB_HOST, 11 | dialect: 'postgres', 12 | logging: false 13 | }); 14 | 15 | await sequelize.authenticate(); 16 | await sequelize.close(); 17 | }; 18 | -------------------------------------------------------------------------------- /src/lib/resolvers/gameResolver.ts: -------------------------------------------------------------------------------- 1 | import { Field, ObjectType, Query, Resolver } from 'type-graphql'; 2 | import gameManager from '../../game-manager'; 3 | 4 | @ObjectType() 5 | class GameInfo { 6 | @Field() 7 | flagFormat: string; 8 | } 9 | 10 | @Resolver() 11 | export class GameResolver { 12 | @Query(returns => GameInfo) 13 | async getGameInfo(): Promise| Sploit | 22 |Team | 23 |Flag | 24 |Time | 25 |Status | 26 |Checksystem Response | 27 |
|---|