Closed saladpanda closed 3 years ago
cool, I'll merge and I'll check if I can de-dup the code - thanks!
No Problem. But I think merging this without thorough testing wasn't a good idea.
I just ran into the first problem with it.
When trying to generate an egghunter without specifying a file with -f I get:
Unable to read file C:\mona\_no_name\
This is caused by this line: https://github.com/corelan/mona/blob/60d98eb8a5b38c67389c68298e556565cbcef338/mona.py#L13744
Other instances of filename != ""
and filename == ""
will probably lead to similar problems.
I just pushed a fix to my branch. Can you re-merge this or should I open another PR?
a new PR would be great, thanks!
This is an attempt at fixing #51.
You should consider this untested. I'm only using a very limited set of monas features but I tested this change with
!mona compare
and it worked as intended. If you have a testsuite you should run it before merging this.The code duplication is not elegant but the best solution I found for the moment.
I searched for
-f
to find positions where to apply the new function. I hope I found all relevant positions.