Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
throw exception on actual payload size violation, not formatted output size #11821
If you generate a size-constrained formatted payload with msfvenom, you can get confusing errors like so:
Here I said I wanted a 57 byte payload, the payload was 57 bytes, and it still failed. What we're looking at is the formatted output, which isn't actually related to payload size. For a more extreme example, look at the 'C' format, which definitely is unrelated.
This changes the failure mode to look at the encoded payload binary rather than the formatted output before throwing a size exception.
List the steps needed to make sure this thing works