mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Changed code to support encoded characters
Change code to support encoded characters from regripper and reading them from regripper output file.
This commit is contained in:
parent
cd963ef0b6
commit
4feb6e187c
@ -29,7 +29,9 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.StringReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.logging.Level;
|
||||
@ -1062,7 +1064,7 @@ class ExtractRegistry extends Extract {
|
||||
|
||||
File regfile = new File(regFilePath);
|
||||
List<BlackboardArtifact> newArtifacts = new ArrayList<>();
|
||||
try (BufferedReader bufferedReader = new BufferedReader(new FileReader(regfile))) {
|
||||
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(regfile), StandardCharsets.UTF_8))) {
|
||||
// Read the file in and create a Document and elements
|
||||
String userInfoSection = "User Information";
|
||||
String previousLine = null;
|
||||
|
4
thirdparty/rr-full/plugins/samparse.pl
vendored
4
thirdparty/rr-full/plugins/samparse.pl
vendored
@ -23,6 +23,7 @@
|
||||
#-----------------------------------------------------------
|
||||
package samparse;
|
||||
use strict;
|
||||
use Encode::Unicode;
|
||||
|
||||
my %config = (hive => "SAM",
|
||||
hivemask => 2,
|
||||
@ -364,7 +365,8 @@ sub _translateSID {
|
||||
#---------------------------------------------------------------------
|
||||
sub _uniToAscii {
|
||||
my $str = $_[0];
|
||||
$str =~ s/\x00//g;
|
||||
Encode::from_to($str,'UTF-16LE','utf8');
|
||||
$str = Encode::decode_utf8($str);
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user