Skip to content

yextend can only be run from its own directory #39

@stoerchl

Description

@stoerchl

I noticed that yextend can only be run from its own directory because it has to match the current working directory. The following two modes of operation did not work for me:

  • Installing yextend globally on my machine and run it from anywhere
  • Run yextend using the relative path to its directory

The reason is, that the archive file type cannot be distinguished and therefore no scan will be performed. As the file type detection is done using a YARA rule which resides in the libs directory of yextend, it cannot be found when run from another directory.

https://github.com/BayshoreNetworks/yextend/blob/master/libs/bayshore_file_type_detect.c#L425-L431

char path[MAXPATHLEN];
if (NULL==getcwd(path, MAXPATHLEN)) {
	// We either have no access or another error occured
	return 65535; //-1;
}

strncat (path, "/libs/bayshore_file_type_detect.yara", sizeof(path)-strlen(path)-1);

Would be great to have the possibility to run it from anywhere on a system. Until then I would probably just mention it in the README file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions