File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,9 @@ def remove_padding(data: Union[str, bytes]):
37
37
return data [:- data [- 1 ]]
38
38
39
39
40
- def _dummy_oracle (cipher : bytes ) -> bool :
41
- raise NotImplementedError ('You must implement the oracle function' )
42
-
43
-
44
40
def padding_oracle (cipher : bytes ,
45
41
block_size : int ,
46
- oracle : Callable [[bytes ], bool ] = _dummy_oracle ,
42
+ oracle : Callable [[bytes ], bool ],
47
43
num_threads : int = 1 ,
48
44
log_level : int = logging .INFO ,
49
45
null : bytes = b' ' ) -> bytes :
@@ -55,7 +51,6 @@ def padding_oracle(cipher: bytes,
55
51
logger = logging .getLogger ('padding_oracle' )
56
52
logger .setLevel (log_level )
57
53
formatter = logging .Formatter ('[%(asctime)s][%(levelname)s] %(message)s' )
58
- # formatter = logging.Formatter('[%(asctime)s][%(name)s][%(levelname)s] %(message)s')
59
54
handler = logging .StreamHandler ()
60
55
handler .setFormatter (formatter )
61
56
logger .addHandler (handler )
You can’t perform that action at this time.
0 commit comments