Skip to content

Conversation

@rishwanth1995
Copy link
Contributor

Other add-ons:

Win32:Registry in third party regripper directory
modified jvm_options in build.xml

// Must be running under a Windows operating system.
if (!PlatformUtil.isWindowsOS()) {
throw new IngestModule.IngestModuleException(Bundle.unsupportedOS_message());
public static File locateExecutable() throws IngestModule.IngestModuleException, IOException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is throwing IOException? We should probably catch that in this method and deal with it appropriately.

}else if(usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()){
photorec_linux_directory = "/usr/local/bin";
}else{
exeFile = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should throw IngestModule.IngestModuleException with message that photorec exe can not be found.

}else if(usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()){
PERL = "/usr/local/bin/perl";
}else{
throw new FileNotFoundException("perl not found in your system");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should throw IngestModuleException.

final private static String RIP_EXE = "rip.exe";
final private static String RIP_PL = "rip.pl";
final private static String PERL = "perl ";
private static String PERL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer needs to be defined up here. It can be a variable in the method.

try {
registry = new ExtractRegistry();
} catch (FileNotFoundException ex) {
Exceptions.printStackTrace(ex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should all go away when we throw only IngestModuleExceptions. And, we should never just print the stack. We need to log it or act on it.

Copy link
Member

@bcarrier bcarrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments added.

@rcordovano rcordovano assigned rcordovano and unassigned rcordovano Feb 12, 2018
@rcordovano rcordovano self-requested a review February 12, 2018 13:34
// Scan the file with Unallocated Carver.
ProcessBuilder processAndSettings = new ProcessBuilder(
"\"" + executableFile + "\"",
executableFile.toString(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the logic behind removing quotes around strings? Does this continue to work on Windows when there are spaces in the paths?

@rcordovano rcordovano removed their request for review February 12, 2018 16:06
@rcordovano rcordovano merged commit 1c682a3 into sleuthkit:release-4.6.0 Feb 12, 2018
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

Successfully merging this pull request may close these issues.

5 participants