| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the semi-independent hivex library into a
separate upstream project. The git repo for hivex is now:
http://git.annexia.org/?p=hivex.git;a=summary
Downloads of hivex are available here:
http://libguestfs.org/download/
All questions, patches, bugs etc should be sent to the libguestfs
mailing list and bug tracker.
|
|
|
|
|
| |
These were being interpreted as signed chars, and thus printed
as "ffffff80" etc.
|
|
|
|
|
|
| |
Since we have to compile with -Wno-unused-variables, we don't
spot unused variables in code. I found these by compiling the
code in Ubuntu.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This removes an unused variable left over by
commit ab608f3948d903af64e814b2e67949a1a71d93a4.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The error behaviour of hivex_node_get_child is subtle, so the 'cd'
command wouldn't always report errors correctly. This fixes it.
|
|
|
|
|
|
| |
The internal allocate_block() function wasn't updating the bitmap,
so if you revisited a block which you had allocated in the same
session, you could get an EFAULT error.
|
| |
|
|
|
|
|
| |
ntreg_lf_record can have id "lf" (old-style hashes) or "lh" (new-
style hashes).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When we later call get_children to visit the intermediate
ri/lf/lh records, we have already deleted the subkey nk-records,
so checking that those nk-records are still valid is not very
helpful.
This commit adds a flag to turn these checks off.
|
|
|
|
|
|
|
|
|
|
|
| |
Some apparently valid registries contain value data length
declarations which exceed the allocated block size for the
value.
Previously the code would return EFAULT for such registries.
However since these appear to be otherwise valid registries,
turn this into a warning and just use the allocated block size
as the data length (in other words, truncate the value).
|
|
|
|
|
| |
This is the smallest registry you can make and still have it
load correctly in Windows regedit.
|
|
|
|
|
|
| |
This adds the 'setval' and 'commit' commands to the hivex shell.
Also adds some example scripts showing use of these.
|
|
|
|
|
|
|
|
|
| |
This implements hivex_node_set_values which is used to
delete the (key, value) pairs at a node and optionally
replace them with a new set.
This also implements hivex_commit which is used to commit
changes to hives back to disk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If this flag is omitted (as in the case for all existing callers)
then the hive is still opened read-only.
We add a 'writable' flag to the hive handle, and we change the way
that the hive file (data) is stored. The data is still mmapped if
the file is opened read-only, since that is more efficient and allows
us to handle larger hives. However if we need to write to the file
then we have to read it all into memory, since if we had to extend the
file we need to realloc that data.
Note the manpage section L</WRITING TO HIVE FILES> comes in a later
commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is not of general interest. It contains the tools which
I used to reverse engineer the hive format and to test changes.
Keeping these with the rest of the code is useful in case in future
we encounter a hive file that we fail to modify.
Note that the tools are not compiled by default. You have to compile
each explicitly with:
make -C hivex/tools <toolname>.opt
You will also need ocaml-extlib-devel and ocaml-bitstring-devel.
|
| |
|
|
|
|
|
|
| |
When hivexsh was called non-interactively, it would print an
annoying extra line. Only print this line if we are being
used interactively.
|
|
|
|
|
|
|
|
| |
Make the result of isatty into a global variable (is_tty).
Change the rl_gets() function so it takes the prompt string
instead of a "display prompt?" flag. rl_gets() then consults
the global to find out if it should display the prompt at all.
|
| |
|
| |
|
|
|
|
| |
This allows us to reuse these macros in hivexsh later.
|
|
|
|
|
|
| |
hivexget is currently a large C program. Now that we have hivexsh
(the shell) we can reimplement hivexget as a simple bash script that
calls out to hivexsh.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the calls to setlocale &c to all of the current
C programs.
It also adds l10n support to hivexget and hivexml which lacked them
previously.
To test this, try:
LANG=pa_IN.UTF-8 guestfish --cmd-help
(You can only do this test after installing the package, or at
least the 'pa.mo' mo-file in the correct place).
|
| |
|
|
|
|
|
|
| |
Update these fields with what we found out from reverse engineering
the file. Also bring the unknownX field names into line with
visualizer.ml.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This was missing. It only worked because we test on a little
endian platform.
|
|
|
|
| |
Taken from sentinelchicken.com documentation.
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the functions that return child subnodes and values so they
can also be used to return a list of the intermediate blocks. This
is so we can delete those intermediate blocks (in a later commit).
We also introduce an offset_list structure which is used for collecting
lists of offsets, ie. lists of nodes, values or blocks.
Note that this commit should not change the semantics of the code.
|
|
|
|
|
|
|
|
|
|
| |
The visitor currently contains lots of value_* callbacks, such as
value_string which is called back when the value has type string.
This is fine but it makes it complicated to deal with the case where
you just want to see 'a value', and don't care about its type.
The value_any callback allows visitors to see values generically.
|
|
|
|
| |
This function can be reused later.
|