You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception when setting boolean option False or integer 0 value in Module Option #39
Sploitkit throws an exception when setting the boolean value False or integer 0 for Module Option. When setting True it works correctly.
Sploitkit version: sploitkit==0.6.0
Python version: 3.12+
Hi @tterletskyy !
Thank you for reporting.
Given your setting, you shall use the following :
classTestModule(Module):
config=Config(
{
Option(
name='SEND_PAYLOAD',
description='Boolean or integer value',
required=True,
transform=lambdas, v: str(v).lower() in ["true", "1"], # this will ensure the boolean valuevalidate=lambdas, v: str(v).lower() in ["false", "true", "0", "1"], # defines the set of values that can serve as a boolean
): None,
}
)
[...]
A bit ugly however ; this implementation does not pre-define some data types yet.
Activity
dhondta commentedon Sep 28, 2024
Hi @tterletskyy !
Thank you for reporting.
Given your setting, you shall use the following :
A bit ugly however ; this implementation does not pre-define some data types yet.