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

s_checksum issues #107

Closed
WenhaoYu opened this issue Nov 29, 2016 · 2 comments
Closed

s_checksum issues #107

WenhaoYu opened this issue Nov 29, 2016 · 2 comments

Comments

@WenhaoYu
Copy link

Hello everyone,I find if i pass a my own defined algorithm function to s_checksum,it may cause a error. so i check the code,and do some changes as blow:
in checksum.py:
add algorithm argument's type judgement
if type(self._algorithm) is not str:
self.checksum_lengths[self._algorithm.name] = self._length
and in _get_dummy_value function :
def _get_dummy_value(self):
if type(self._algorithm) is str:
return self.checksum_lengths[self._algorithm] * '\x00'
else:
return self.checksum_lengths[self._algorithm.name] * '\x00'
hope it would be helpful or anyone have good idea?

@jtpereyda
Copy link
Owner

WenhaoYu,

You said you already tried to pass in your own function. Could you post the code you used to do this? It appears that this should have worked.

If you want to add an algorithm into the code (which would make sense if it something that a lot of others may want to use), you should modify Checksum._checksum() and Checksum.checksum_lengths.

ottimo pushed a commit to ottimo/boofuzz that referenced this issue Jun 21, 2017
ottimo pushed a commit to ottimo/boofuzz that referenced this issue Jun 21, 2017
jtpereyda added a commit that referenced this issue Jun 22, 2017
Fix return dummy value in custom checksum (issue #107)
@jtpereyda
Copy link
Owner

Closed due to inactivity from opener and ottimo's related fix in PR #149.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants