FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

slj99/ret2shell: A feature-riches CTF challenge platform! · GitHub

Repository navigation

About

A feature-riches CTF challenge platform!

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2,089 Commits

Folders and files

Repository files navigation

A feature-riches CTF challenge platform

Support

QQ Group: 1104642385

Telegram: https://t.me/ret2shell

Deployment

Ret2Shell is single binary with requirements of redis/valkey 8+, postgres 18+, nats 2+ and optional VictoriaLog and registry.

All the components could be deploy anywhere, so you can deploy ret2shell as you like.

Development

1. Install Toolchains

Install Rust for backend

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then use rustup to install the latest stable toolchain.

rustup install stable

You are done for backend development.

Install Node.js and Pnpm for frontend

curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash -

Then install pnpm

corepack enable pnpm

2. Setup Development Environment

License notice

Ret2Shell is distributed under a GPL-3.0-derived custom copyleft license that incorporates GPL-3.0 in Appendix A and adds user-facing monetization restrictions. See LICENSE for the binding license text and COMMERCIAL_POLICY.md for plain-language guidance.

Setup frontend

Frontend files are located in web/ directory. Enter the directory or add --prefix=web option after pnpm command.

Setup frontend dependencies:

pnpm install

Setup other services

See deploy/nginx-module/ret2shell.dev.conf. You could put it into your nginx configuration directory like /etc/nginx/sites-enabled/.

You may need other services like database, redis to be configured, please refer to deploy/docker-compose.dev.yml.

Copy config/config.sample.toml to config/config.toml, and modify it to fit your environment.

For other deployments, see at deploy/.

3. Launch

Frontend

To start a development server, run the following command at web/ context:

pnpm dev --host

Or run pnpm --prefix=web dev --host at the root directory.

Note

If you want to specify a remote backend server, you can add environment variable VITE_DEV_API_TARGET when running the development server. For example:

VITE_DEV_API_TARGET=http://localhost:8080 pnpm dev

This would be helpful if you only focus on frontend development.

Backend

Run the following command to start the backend server:

cargo run --bin r2s-server

Build

Make sure you have installed the toolchains.

To build frontend files:

pnpm build

The built files will be produced in web/dist.

To build backend server binary:

# if you want to host it with systemd
cargo build --release --bin r2s-server
# or you want to host it in an older linux distro
cargo build --release --bin r2s-server --target x86_64-unknown-linux-musl

The built binary will be produced in target/release/, musl binaries will be produced in target/x86_64-unknown-linux-musl/release/.

You can also build the docker image:

# if you use fish
./release-image.fish
# or run with bash
./release-image.sh

License

Ret2Shell is licensed under:

About

A feature-riches CTF challenge platform!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL