Git Product home page Git Product logo

chepy's Introduction

Chepy

Solving a CTF with Chepy

Chepy is a python library with a handy cli that is aimed to mirror some of the capabilities of CyberChef. A reasonable amount of effort was put behind Chepy to make it compatible to the various functionalities that CyberChef offers, all in a pure Pythonic manner. There are some key advantages and disadvantages that Chepy has over Cyberchef. The Cyberchef concept of stacking different modules is kept alive in Chepy.

There is still a long way to go for Chepy as it does not offer every single ability of Cyberchef.

Docs

Refer to the docs for full usage information

Example

For all usage and examples, see the docs.

Chepy has a stacking mechanism similar to Cyberchef. For example, this in Cyberchef:

This is equivalent to

from chepy import Chepy

file_path = "/tmp/demo/encoding"

print(
    Chepy(file_path)
    .load_file()
    .reverse()
    .rot_13()
    .base64_decode()
    .base32_decode()
    .hexdump_to_str()
    .o
)

Chepy vs Cyberchef

Advantages

  • Chepy is pure python with a supporting and accessible python api
  • Chepy has a CLI
  • Chepy CLI has full autocompletion.
  • Supports pe, elf, and other various file format specific parsing.
  • Extendable via plugins
  • Infinitely scalable as it can leverage the full Python library.
  • Chepy can interface with the full Cyberchef web app to a certain degree. It is easy to move from Chepy to Cyberchef if need be.
  • The Chepy python library is significantly faster than the Cyberchef Node library.
  • Works with HTTP/S requests without CORS issues.

Disadvantages

  • Chepy is not a web app (at least for now).
  • Chepy does not offer every single thing that Cyberchef does
  • Chepy does not have the magic method (at the moment)

Installation

Chepy can be installed in a few ways.

Pypi

pip3 install chepy
# optionally with extra requirements
pip3 install chepy[extras]

Git

git clone --recursive https://github.com/securisec/chepy.git
cd chepy
pip3 install -e .
# I use -e here so that if I update later with git pull, I dont have it install it again (unless dependencies have changed)
docker run --rm -ti -v $PWD:/data securisec/chepy "some string" [somefile, "another string"]

Standalone binary

One can build Chepy to be a standalone binary also. This includes packaging all the dependencies together.

git clone https://github.com/securisec/chepy.git
cd chepy
pip install .
pip install pyinstaller
pyinstaller cli.py --name chepy --onefile

The binary will be in the dist/ folder.

Plugins

Check here for plugins docs

.. toctree::
   :maxdepth: 3
   :caption: Contents:

   usage.md
   examples.md
   cli.rst
   chepy.md
   core.md
   modules.rst
   extras.rst
   plugins.md
   pullrequest.md
   config.md
   faq.md


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

chepy's People

Contributors

securisecctf avatar 0xjohannes avatar securisec avatar

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.