Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload size calculations should normalize the datastore first #4931

Closed
hdm opened this issue Mar 14, 2015 · 2 comments
Closed

Payload size calculations should normalize the datastore first #4931

hdm opened this issue Mar 14, 2015 · 2 comments
Assignees

Comments

@hdm
Copy link
Contributor

hdm commented Mar 14, 2015

Payload sizes are determined by calling payload_module.new.size, this operation doesn't apply normalization to the datastore for the module's options, which results in invalid behavior.

For example, any OptBool datastore options will always be set to true, since "false" is truthy. The fix would be to determine whether the datastore has been normalized in the size() method and normalize it if needed. This would remove the need for a bunch of existing hacks, but will require some sane defaults to be set for things like LHOST, otherwise the normalization will fail due to option validation errors.

@hdm hdm self-assigned this Mar 14, 2015
@hdm
Copy link
Contributor Author

hdm commented Mar 14, 2015

A recent example of where this was a problem, commit hash 0d12ca4.

@busterb
Copy link
Member

busterb commented Apr 2, 2019

I don't think this is actually required anymore, at least not for bool, since OptBool, since this issue was created, now returns a true/false without normalization, not a string.

@busterb busterb closed this as completed Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants