Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ files/game_materials/*
files/flag_attachments/*
files/*.db
files/*.cfg
files/save_user.txt
files/user/*
files/boxes.csv

#Alembic
alembic/alembic.ini
Expand Down Expand Up @@ -78,3 +81,6 @@ __pycache__

# Readme
!*README.md

# Claude
CLAUDE.md
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

FROM python:3.8

RUN mkdir /opt/rtb
ADD . /opt/rtb

RUN apt-get update && apt-get install -y \
build-essential zlib1g-dev rustc \
python3-pycurl sqlite3 libsqlite3-dev
python3-pycurl sqlite3 libsqlite3-dev

ADD ./setup/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt --upgrade

ENV SQL_DIALECT=sqlite

RUN mkdir /opt/rtb
ADD . /opt/rtb

VOLUME ["/opt/rtb/files"]
ENTRYPOINT ["python3", "/opt/rtb/rootthebox.py", "--setup=docker"]
ENTRYPOINT ["python3", "/opt/rtb/rootthebox.py", "--setup=docker", "--generate_team_file=/opt/rtb/files/user/test_equipe.csv", "--generate_boxes_flag=/opt/rtb/files/boxes.csv", "--dynamic_flag_value=True", "--dynamic_flag_type=decay_all", "--flag_value_decrease=6", "--flag_value_minimum=100"]
46 changes: 46 additions & 0 deletions alembic/versions/b3f1c0d7ae21_add_team_table_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""add_team_table_id

Revision ID: b3f1c0d7ae21
Revises: 1ee5b63e716f
Create Date: 2026-09-05 00:00:00.000000

"""
import sqlalchemy as sa
from sqlalchemy.engine.reflection import Inspector

from alembic import op

# revision identifiers, used by Alembic.
revision = 'b3f1c0d7ae21'
down_revision = '1ee5b63e716f'
branch_labels = None
depends_on = None

try:
conn = op.get_bind()
inspector = Inspector.from_engine(conn)
tables = inspector.get_table_names()
except:
conn = None
inspector = None
tables = None

def _table_has_column(table, column):
if not inspector:
return True
has_column = False
for col in inspector.get_columns(table):
if column not in col["name"]:
continue
has_column = True
return has_column


def upgrade():
if not _table_has_column("team", "_table_id"):
op.add_column("team", sa.Column("_table_id", sa.Integer()))


def downgrade():
if _table_has_column("team", "_table_id"):
op.drop_column("team", "_table_id")
Empty file modified bot/BotMonitor.py
100755 → 100644
Empty file.
Empty file modified bot/bot.py
100755 → 100644
Empty file.
154 changes: 150 additions & 4 deletions cyberchef/ChefWorker.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@
* @license MIT
*/

/*!
* urlsafe-base64
*/

/*! cptable.js (C) 2013-present SheetJS -- http://sheetjs.com */

/*! cputils.js (C) 2013-present SheetJS -- http://sheetjs.com */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
Expand Down Expand Up @@ -74,6 +84,13 @@
* @license Apache-2.0
*/

/**
* @author Daniel Temkin [http://danieltemkin.com]
* @author Thomas Leplus [https://www.leplus.org]
* @copyright Crown Copyright 2021
* @license Apache-2.0
*/

/**
* @author GCHQ Contributor [2]
* @copyright Crown Copyright 2016
Expand Down Expand Up @@ -140,12 +157,23 @@
* @license Apache-2.0
*/

/**
* @author MikeCAT
* @license Apache-2.0
*/

/**
* @author PenguinGeorge [george@penguingeorge.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/

/**
* @author Thomas Weißschuh [thomas@t-8ch.de]
* @copyright Crown Copyright 2021
* @license Apache-2.0
*/

/**
* @author Unknown Male 282
* @copyright Crown Copyright 2016
Expand All @@ -172,6 +200,12 @@
* @license Apache-2.0
*/

/**
* @author arnydo [github@arnydo.com]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/

/**
* @author bmwhitn [brian.m.whitney@outlook.com]
* @copyright Crown Copyright 2017
Expand Down Expand Up @@ -218,6 +252,12 @@
* @license Apache-2.0
*/

/**
* @author gchq77703 [gchq77703@gchq.gov.uk]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/

/**
* @author h345983745
* @copyright Crown Copyright 2019
Expand Down Expand Up @@ -255,19 +295,43 @@
* @license Apache-2.0
*/

/**
* @author mikecat
* @copyright Crown Copyright 2022
* @license Apache-2.0
*/

/**
* @author mikecat
* @copyright Crown Copyright 2023
* @license Apache-2.0
*/

/**
* @author n1073645 [n1073645@gmail.com]
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2020
* @license Apache-2.0
*/

/**
* @author n1073645 [n1073645@gmail.com]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/

/**
* @author n1073645 [n1073645@gmail.com]
* @copyright Crown Copyright 2020
* @license Apache-2.0
*/

/**
* @author n1073645 [n1073645@gmail.com]
* @copyright Crown Copyright 2022
* @license Apache-2.0
*/

/**
* @author n1474335 [n1474335@gmail.com]
* @author Klaxon [klaxon@veyr.com]
Expand All @@ -282,6 +346,13 @@
* @license Apache-2.0
*/

/**
* @author n1474335 [n1474335@gmail.com]
* @author cplussharp
* @copyright Crown Copyright 2016
* @license Apache-2.0
*/

/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
Expand All @@ -306,18 +377,54 @@
* @license Apache-2.0
*/

/**
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2022
* @license Apache-2.0
*/

/**
* @author sevzero [sevzero@protonmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/

/**
* @author sg5506844 [sg5506844@gmail.com]
* @copyright Crown Copyright 2021
* @license Apache-2.0
*/

/**
* @author sw5678
* @copyright Crown Copyright 2023
* @license Apache-2.0
*/

/**
* @author sw5678
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/

/**
* @author tcode2k16 [tcode2k16@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/

/**
* @author tcode2k16 [tcode2k16@gmail.com]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/

/**
* @author tedk [tedk@ted.do]
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/

/**
* @author tlwr [toby@toby.codes]
* @author Matt C [me@mitt.dev]
Expand All @@ -338,6 +445,20 @@
* @license Apache-2.0
*/

/**
* @author tomgond [tom.gonda@gmail.com]
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/

/**
* Base45 resources.
*
* @author Thomas Weißschuh [thomas@t-8ch.de]
* @copyright Crown Copyright 2021
* @license Apache-2.0
*/

/**
* Base58 resources.
*
Expand All @@ -363,6 +484,14 @@
* @license Apache-2.0
*/

/**
* Base92 resources.
*
* @author sg5506844 [sg5506844@gmail.com]
* @copyright Crown Copyright 2021
* @license Apache-2.0
*/

/**
* Binary Code Decimal resources.
*
Expand Down Expand Up @@ -426,10 +555,10 @@
/**
* CyberChef - The Cyber Swiss Army Knife
*
* @copyright Crown Copyright 2016
* @copyright Crown Copyright 2016-2024
* @license Apache-2.0
*
* Copyright 2016 Crown Copyright
* Copyright 2016-2024 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -525,6 +654,14 @@
* @license Apache-2.0
*/

/**
* Protocol parsing functions.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2022
* @license Apache-2.0
*/

/**
* Some parts taken from mimelib (http://github.com/andris9/mimelib)
* @author Andris Reinman
Expand All @@ -535,6 +672,15 @@
* @license Apache-2.0
*/

/**
* Sorting functions
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2022
* @license Apache-2.0
*
*/

/**
* Various delimiters
*
Expand All @@ -555,7 +701,7 @@
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateConfig.mjs
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2021
* @copyright Crown Copyright 2024
* @license Apache-2.0
*/

Expand Down Expand Up @@ -590,4 +736,4 @@

//! moment.js locale configuration

//! version : 0.5.33
//! version : 0.5.45
6 changes: 3 additions & 3 deletions cyberchef/CyberChef.html

Large diffs are not rendered by default.

Loading