diff --git a/README.md b/README.md index ea0fc54..04fb0ad 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# PadDown -PadDown is an AES CBC PKCS7 [Padding Oracle Attack](https://en.wikipedia.org/wiki/Padding_oracle_attack) engine. It simplifies performing [Padding Oracle Attack](https://en.wikipedia.org/wiki/Padding_oracle_attack) on a vulnerable encryption service. This is useful for both CTF and real-world attacks, where you are in possession of a ciphertext, and have a so called Padding Oracle available. +# Paddown +Paddown is an AES CBC PKCS7 [Padding Oracle Attack](https://en.wikipedia.org/wiki/Padding_oracle_attack) engine. It simplifies performing [Padding Oracle Attack](https://en.wikipedia.org/wiki/Padding_oracle_attack) on a vulnerable encryption service. This is useful for both CTF and real-world attacks, where you are in possession of a ciphertext, and have a so called Padding Oracle available. ## Usage -* Using PadDown is as easy as subclassing the `Paddown` class overwriting the ``hasValidPadding(...)`` method retuning a `bool`. As argument it takes ciphertext to test against the Padding Oracle. Have your implementation return ``True`` if you receive no padding error and ``False`` otherwise. +* Using Paddown is as easy as subclassing the `Paddown` class overwriting the ``hasValidPadding(...)`` method retuning a `bool`. As argument it takes ciphertext to test against the Padding Oracle. Have your implementation return ``True`` if you receive no padding error and ``False`` otherwise. * Now you are ready to call `.decrypt()` on your class and start decrypting your ciphertext. -Examples can be found in the `PadDown/examples` directory. +Examples can be found in the `./examples` directory. ## Development diff --git a/paddown.py b/paddown.py index d4d2030..ab282f6 100644 --- a/paddown.py +++ b/paddown.py @@ -1,8 +1,7 @@ +import logging from abc import ABC, abstractmethod -import structlog - -logger = structlog.get_logger(__name__) +logger = logging.getLogger(__name__) class PaddownException(Exception): diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9f3efc7..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -appdirs==1.4.3 -attrs==19.2.0 -black==19.3b0 -Click==7.0 -toml==0.10.0 diff --git a/requirements/base.txt b/requirements/base.txt index 9b6a369..945c9b4 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,2 +1 @@ -pycryptodome==3.9.0 -structlog==20.1.0 +. \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..985e6f5 --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="Paddown", + version="0.1.0", + author="EPAD", + author_email="epadctf@gmail.com", + description="CBC PKCS7 Padding Oracle Attack engine", + long_description=long_description, + long_description_content_type="text/markdown", + py_modules=["paddown"], + install_requires=["pycryptodome==3.9.0"], + entry_points=""" + [console_scripts] + paddown=paddown:paddown + """, + url="https://github.com/epadctf/Paddown", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires=">=3.7", +)