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

retdec-bin2pat fails with "FileNotFoundError: The filename or extension is too long" #472

Closed
ghost opened this issue Jan 26, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 26, 2019

I am attempting to create a yara signature from the open-source ps2sdk through the retdec-signature-from-library-creator.py script. Upon running it I receive the error

FileNotFoundError: [WinError 206] The filename or extension is too long

Upon modifying retdec-utils.py to print out the arguments being passed to retdec-bin2pat.exe I can see that it is indeed too long. After copying the command into notepad++ I can see that it is a total of 118,999 characters long.

I did look into a way to get around this. You can see here that Microsofts recommends modifying programs that require long command lines to use a file that contains the parameter information instead. A good solution would appear to give an option to retdec-bin2pat to do so and have retdec-utils.py automatically pass them this way if they exceed a certain length.

@ghost ghost changed the title retdec-bin2pat Input Too Long retdec-bin2pat Parameters Too Long Jan 26, 2019
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 3, 2019
The added option -j --json is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a json file.
Resolves avast#472
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 3, 2019
The added option -j --json is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a json file.
Resolves avast#472
@s3rvac s3rvac changed the title retdec-bin2pat Parameters Too Long retdec-bin2pat fails with "FileNotFoundError: The filename or extension is too long" Feb 5, 2019
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 5, 2019
The added option -l --list is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a text file.
Resolves avast#472
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 5, 2019
The added option -l --list is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a text file.
Resolves avast#472
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 5, 2019
The added option -l --list is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a text file.
Resolves avast#472
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 6, 2019
The added option -l --list is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a text file.
Resolves avast#472
astrelsky pushed a commit to astrelsky/retdec that referenced this issue Feb 6, 2019
The added option -l --list is being used to pass the list of objects
from retdec-signature-from-library-creator.py as a text file.
Resolves avast#472
@s3rvac
Copy link
Member

s3rvac commented Feb 7, 2019

Thank you for the report. The issue has been fixed by @astrelsky in #484 (thanks for the PR!).

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

1 participant