mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
4606 add checks for values before use in samparse.pl
This commit is contained in:
parent
bb1b99172a
commit
2e1ca275e1
21
thirdparty/rr-full/plugins/samparse.pl
vendored
21
thirdparty/rr-full/plugins/samparse.pl
vendored
@ -80,12 +80,21 @@ sub pluginmain {
|
|||||||
my $key_path = 'SAM\\Domains\\Account\\Users';
|
my $key_path = 'SAM\\Domains\\Account\\Users';
|
||||||
my $key;
|
my $key;
|
||||||
my $local_sid = "";
|
my $local_sid = "";
|
||||||
my $account_value = $root_key->get_subkey("SAM\\Domains\\Account")->get_value("V")->get_data();;
|
my $account_key = $root_key->get_subkey("SAM\\Domains\\Account");
|
||||||
if (defined $account_value) {
|
if (defined $account_key) {
|
||||||
my $data_len = length($account_value);
|
my $account_value = $account_key->get_value("V");
|
||||||
if ($data_len >= 12) {
|
if (defined $account_value) {
|
||||||
my @vAt = unpack("VVV",substr($account_value, $data_len-12, 12));
|
my $account_data = $account_value->get_data();
|
||||||
$local_sid = "S-1-5-21-".$vAt[0]."-".$vAt[1]."-".$vAt[2];
|
if (defined $account_data) {
|
||||||
|
my $data_len = length($account_data);
|
||||||
|
if ($data_len >= 12) {
|
||||||
|
my @vArray = unpack("VVV",substr($account_data, $data_len-12, 12));
|
||||||
|
my $vArray_len = @vArray;
|
||||||
|
if ($vArray_len == 3) {
|
||||||
|
$local_sid = "S-1-5-21-".$vArray[0]."-".$vArray[1]."-".$vArray[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($key = $root_key->get_subkey($key_path)) {
|
if ($key = $root_key->get_subkey($key_path)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user