Jump to content
Nytro

Chepy

Recommended Posts

logo.png

badge.svg Travis (.com) 68747470733a2f2f696d672e736869656c64732e 68747470733a2f2f636f6465636f762e696f2f67

68747470733a2f2f696d672e736869656c64732e 68747470733a2f2f696d672e736869656c64732e

68747470733a2f2f696d672e736869656c64732e 68747470733a2f2f696d672e736869656c64732e 68747470733a2f2f6261646765732e6769747465

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:

cc_encoding.png

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
)

Installation

Chepy can be installed in a few ways.

Pypi

pip3 install chepy

Git

git clone 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)

Pipenv

git clone https://github.com/securisec/chepy.git
cd chepy
pipenv install

Docker

docker run --rm -ti -v $PWD:/data securisec/chepy "some string" [somefile, "another string"]

Chepy vs Cyberchef

Advantages

  • Chepy is pure python with a supporting and accessible python api
  • Chepy has a CLI
  • Chepy CLI has full autocompletion.
  • Extendable via plugins
  • Chepy has the concept of recipes which makes sharing much simpler.
  • 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)
.. toctree::
   :maxdepth: 3
   :caption: Contents:

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


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

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

 

Sursa: https://github.com/securisec/chepy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...