Hilko Bengen
2017-Jul-11 10:06 UTC
[Libguestfs] [PATCH] hivexml: Add -u flag for HIVEX_OPEN_UNSAFE
--- xml/hivexml.c | 5 ++++- xml/hivexml.pod | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xml/hivexml.c b/xml/hivexml.c index b496bb6..8ba6594 100644 --- a/xml/hivexml.c +++ b/xml/hivexml.c @@ -95,7 +95,7 @@ main (int argc, char *argv[]) int open_flags = 0; int visit_flags = 0; - while ((c = getopt (argc, argv, "dk")) != EOF) { + while ((c = getopt (argc, argv, "dku")) != EOF) { switch (c) { case 'd': open_flags |= HIVEX_OPEN_DEBUG; @@ -103,6 +103,9 @@ main (int argc, char *argv[]) case 'k': visit_flags |= HIVEX_VISIT_SKIP_BAD; break; + case 'u': + open_flags |= HIVEX_OPEN_UNSAFE; + break; default: fprintf (stderr, "hivexml [-dk] regfile > output.xml\n"); exit (EXIT_FAILURE); diff --git a/xml/hivexml.pod b/xml/hivexml.pod index 257257c..afab80b 100644 --- a/xml/hivexml.pod +++ b/xml/hivexml.pod @@ -29,6 +29,13 @@ bug report. Keep going even if we find errors in the Registry file. This skips over any parts of the Registry that we cannot read. +=item B<-u> + +Use heuristics to tolerate certain levels of corruption within hives. + +This is unsafe but may allow to export/merge valid keys/values in an +othewise corrupted hive. + =back =head1 SEE ALSO -- 2.13.2
Apparently Analagous Threads
- [PATCH v4 1/5] add HIVEX_OPEN_UNSAFE flag.
- [PATCH] Report last-modified time of hive root and nodes
- [Hivex][PATCH v2] Report last-modified time of hive root and nodes
- [PATCH v4 0/5] hivex: handle corrupted hives better.
- [PATCH] hivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation; link hivexml against libgnu.