# CTF-Party | A Ruby Library To Enhance And Speed Up Script/Exploit Writing For CTF Players

**URL:** <https://onehack.st/t/ctf-party-a-ruby-library-to-enhance-and-speed-up-script-exploit-writing-for-ctf-players/176624>\
**Category:** Tools & Scripts\
**Tags:** tools, programming\
**Created:** [March 25, 2021, 3:17pm UTC](https://onehack.st/t/ctf-party-a-ruby-library-to-enhance-and-speed-up-script-exploit-writing-for-ctf-players/176624 "2021-03-25T15:17:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueHacker](https://onehack.st/user_avatar/onehack.st/bluehacker/32/174721_2.png) [@BlueHacker](https://onehack.st/u/BlueHacker)\
**Post date:** [March 25, 2021, 3:17pm UTC](https://onehack.st/t/ctf-party-a-ruby-library-to-enhance-and-speed-up-script-exploit-writing-for-ctf-players/176624/1 "2021-03-25T15:17:57Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/f/e/fea6780ce2bafa54962a0d947e2ef1dffef7f0e6.png)

A library to enhance and speed up script/exploit writing for CTF players (or security researchers, bug bounty hunters, pentesters but mostly focused on CTF) by patching the String class to add a short syntax of usual code patterns. The philosophy is also to keep the library to be pure ruby (no dependencies) and not to re-implement what another library is already doing well (eg. [xorcist](https://github.com/fny/xorcist) for xor).

For example instead of writing:

```auto
require 'base64'myvar = 'string'myvar = Base64.strict_encode64(myvar)

```

Just write (shorter and easier to remember):

```auto
require 'ctf_party'myvar = 'string'myvar.to_b64!

```

**Features**

- base64: `to_b64`, `to_b64!`, `from_b64`, `from_b64!`, `b64?`
- digest: `md5`, `md5!`, `sha1`, `sha1!`, etc.
- flag: `flag`, `flag!`, `flag?` (apply/check a flag format)
- rot: `rot`, `rot!`, `rot13`, `rot13!`
- hex: `hex2dec`, `dec2hex`, `to_hex`, `from_hex`, `hex2bin`, `bin2hex` and bang versions

**References**

Homepage / Documentation: [https://noraj.github.io/ctf-party](https://noraj.github.io/ctf-party)

**Author**

Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense.

## GitHub:

> **[GitHub - Orange-Cyberdefense/ctf-party: :flags: A library to enhance and speed up...](https://github.com/Orange-Cyberdefense/ctf-party)**
>
> :flags: A library to enhance and speed up script/exploit writing for CTF players
