Skip to content

Commit 06d3537

Browse files
clarified api usage, and how to actually exploit a paddin oracle
1 parent 288f20a commit 06d3537

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

docs/api.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Padding Oracle Exploit API.
1212
Main Interface
1313
--------------
1414

15-
Tool authors should subclass the :class:`PaddingOracle` class and implement :meth:`oracle`.
16-
A typical example may look like::
15+
Tool authors should subclass the :class:`PaddingOracle` class and implement
16+
:meth:`oracle`. A typical example may look like::
1717

1818
from paddingoracle import PaddingOracle, BadPaddingException
1919

@@ -27,6 +27,17 @@ A typical example may look like::
2727

2828
raise BadPaddingException
2929

30+
To exploit the padding oracle vulnerability, simply::
31+
32+
padbuster = PadBuster()
33+
decrypted = padbuster.decrypt(encrypted_data)
34+
35+
print decrypted
36+
37+
That's all! The hard work of actually carrying out the attack is handled
38+
in the :meth:`PaddingOracle.bust` method (not documented), which in turns
39+
calls the :meth:`~PaddingOracle.oracle` method implemented by your code.
40+
3041
.. autoclass:: PaddingOracle
3142
:members: decrypt, encrypt, oracle, analyze
3243

0 commit comments

Comments
 (0)