mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Added better error message to FILE_EXE check
This commit is contained in:
parent
dfe80233a6
commit
9f84074cb9
@ -483,6 +483,7 @@ while (1) {
|
|||||||
# Error messages
|
# Error messages
|
||||||
sub forbid {
|
sub forbid {
|
||||||
my $ip = shift;
|
my $ip = shift;
|
||||||
|
$ip = "" unless defined ($ip);
|
||||||
|
|
||||||
print "HTTP/1.0 403 Forbidden$::HTTP_NL"
|
print "HTTP/1.0 403 Forbidden$::HTTP_NL"
|
||||||
. "Content-type: text/html$::HTTP_NL$::HTTP_NL"
|
. "Content-type: text/html$::HTTP_NL$::HTTP_NL"
|
||||||
@ -542,6 +543,8 @@ sub spawn_cli {
|
|||||||
|
|
||||||
while (<STDIN>) {
|
while (<STDIN>) {
|
||||||
|
|
||||||
|
last if (/^\s+$/);
|
||||||
|
|
||||||
if (/^GET \/+(\S*)\s?HTTP/) {
|
if (/^GET \/+(\S*)\s?HTTP/) {
|
||||||
my $url = $1;
|
my $url = $1;
|
||||||
my $script;
|
my $script;
|
||||||
@ -593,6 +596,21 @@ sub spawn_cli {
|
|||||||
# Turn timer off
|
# Turn timer off
|
||||||
alarm(0);
|
alarm(0);
|
||||||
|
|
||||||
|
my $has_ref = 0;
|
||||||
|
while (<STDIN>) {
|
||||||
|
last if (/^\s+$/);
|
||||||
|
if (/^Referer: /) {
|
||||||
|
$has_ref = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($has_ref == 0) && ($args ne "")) {
|
||||||
|
Print::log_session_info("ERROR: Missing referer value");
|
||||||
|
forbid();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
# Print status
|
# Print status
|
||||||
print "HTTP/1.0 200 OK$::HTTP_NL";
|
print "HTTP/1.0 200 OK$::HTTP_NL";
|
||||||
::main($args);
|
::main($args);
|
||||||
@ -781,16 +799,16 @@ sub check_tools {
|
|||||||
print "ERROR: Sleuth Kit img_stat executable missing\n";
|
print "ERROR: Sleuth Kit img_stat executable missing\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
unless (-x "$::FILE_EXE") {
|
unless ((defined $::FILE_EXE) && (-x "$::FILE_EXE")) {
|
||||||
print "ERROR: Sleuth Kit (or local) file executable missing\n";
|
print "ERROR: File executable ($::FILE_EXE) missing\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
unless (-x $::TSKDIR . "/fsstat") {
|
unless (-x $::TSKDIR . "/fsstat") {
|
||||||
print "ERROR: Sleuth Kit fsstat executable missing\n";
|
print "ERROR: Sleuth Kit fsstat executable missing\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
unless (-x "$::MD5_EXE") {
|
unless ((defined $::MD5_EXE) && (-x "$::MD5_EXE")) {
|
||||||
print "ERROR: md5 executable missing\n";
|
print "ERROR: md5 executable ($::MD5_EXE) missing\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if ($::SHA1_EXE ne "") {
|
if ($::SHA1_EXE ne "") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user