summaryrefslogtreecommitdiffstats
path: root/hivex
Commit message (Collapse)AuthorAgeFilesLines
* Spin off hivex as a separate upstream project.Richard Jones2010-02-2231-8110/+0
| | | | | | | | | | | | | | 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.
* hivexsh: Print hex bytes >= 0x80 correctly.Richard Jones2010-02-191-1/+2
| | | | | These were being interpreted as signed chars, and thus printed as "ffffff80" etc.
* Remove some unused variables.Richard Jones2010-02-151-1/+0
| | | | | | 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.
* Add scripts to EXTRA_DIST.Richard Jones2010-02-051-2/+14
|
* hivex: example6: Don't double backslashes.Richard Jones2010-02-051-1/+1
|
* hivex: example6: Hypothetical addition of keys for viostor.Richard Jones2010-02-051-0/+126
|
* hivex: Fix handling of inline VKs.Richard Jones2010-02-052-31/+35
|
* hivexsh: Set correct type for 'expandstring' values.Richard Jones2010-02-051-1/+1
|
* hivex: Documentation and cleanups.Richard Jones2010-02-051-1/+2
|
* hivex: Make limits into macros.Richard Jones2010-02-052-5/+13
|
* hivexsh: Remove unused variable.Richard Jones2010-02-051-1/+0
| | | | | This removes an unused variable left over by commit ab608f3948d903af64e814b2e67949a1a71d93a4.
* hivex: Complete the implementation of adding child nodes.Richard Jones2010-02-055-12/+378
|
* hivex: More debugging around nk 'unknown2' field.Richard Jones2010-02-041-10/+26
|
* hivex: Check hash fields in lf/lh records.Richard Jones2010-02-041-20/+61
|
* hivexsh: del command: Fix error message.Richard Jones2010-02-041-1/+1
|
* hivexsh: lsval: Remove stray quotation mark.Richard Jones2010-02-041-1/+1
|
* hivexsh: cd command: fix error handlingRichard Jones2010-02-041-2/+6
| | | | | The error behaviour of hivex_node_get_child is subtle, so the 'cd' command wouldn't always report errors correctly. This fixes it.
* hivex: allocate_block should update valid block bitmap.Richard Jones2010-02-041-0/+2
| | | | | | 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.
* hivex: More debug messages.Richard Jones2010-02-041-1/+10
|
* hivex: Documentation update.Richard Jones2010-02-041-1/+1
| | | | | ntreg_lf_record can have id "lf" (old-style hashes) or "lh" (new- style hashes).
* hivex: Some missing le32toh endianness conversions.Richard Jones2010-02-041-2/+2
|
* hivexsh: Document some peculiarities of the "cd" command.Richard Jones2010-02-041-1/+8
|
* hivex: Implement deleting child nodes.Richard Jones2010-02-046-0/+317
|
* hivex: Add flags argument to internal get_children() function.Richard Jones2010-02-041-14/+21
| | | | | | | | | 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.
* hivex: Don't die on valid registries which have bad declared data lengths.Richard Jones2010-02-041-5/+8
| | | | | | | | | | | 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).
* hivex: Minimal registry example.Richard Jones2010-02-044-1/+28
| | | | | This is the smallest registry you can make and still have it load correctly in Windows regedit.
* hivexsh: Add 'setval' and 'commit' commands.Richard Jones2010-02-046-4/+491
| | | | | | This adds the 'setval' and 'commit' commands to the hivex shell. Also adds some example scripts showing use of these.
* hivex: Begin implementation of writing to hives.Richard Jones2010-02-043-0/+521
| | | | | | | | | 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.
* hivex: Add HIVEX_OPEN_WRITE flag to allow hive to be opened for writing.Richard Jones2010-02-045-22/+52
| | | | | | | | | | | | | | | 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.
* Tools for analyzing and reverse engineering hive files.Richard Jones2010-02-0410-0/+1627
| | | | | | | | | | | | | | 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.
* hivexsh: Change some exit(1) -> exit(EXIT_FAILURE)Richard Jones2010-02-041-2/+2
|
* hivexsh: Only print final \n when interactive.Richard Jones2010-02-041-1/+2
| | | | | | When hivexsh was called non-interactively, it would print an annoying extra line. Only print this line if we are being used interactively.
* hivexsh: Change handling of prompt argument to rl_gets()Richard Jones2010-02-041-9/+10
| | | | | | | | 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.
* Document that this flag is clear for default keys.Richard Jones2010-02-041-1/+2
|
* Misc documentation and gitignore update.Richard Jones2010-02-041-1/+3
|
* Move htole*/le*toh macros into a separate header file.Richard Jones2010-02-043-42/+93
| | | | This allows us to reuse these macros in hivexsh later.
* hivex: Reimplement hivexget as a simple shell script.Richard Jones2010-01-293-294/+45
| | | | | | 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.
* hivex: Add 'hivexsh' program (shell for navigating registry hives).Richard Jones2010-01-296-6/+993
|
* Set locale in C programs so l10n works (RHBZ#559962).Richard Jones2010-01-293-9/+40
| | | | | | | | | | | | | | | 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).
* hivex: Const-correctness fix on header_checksum (thanks Jim Meyering).Richard Jones2010-01-281-1/+1
|
* hivex: Update some previously unknown nk-record fields.Richard Jones2010-01-281-5/+11
| | | | | | Update these fields with what we found out from reverse engineering the file. Also bring the unknownX field names into line with visualizer.ml.
* hivex: Fix calculation of block size for vk data blocks.Richard Jones2010-01-281-1/+1
|
* hivex: Display incorrect block size as unsigned in an error message.Richard Jones2010-01-281-1/+1
|
* hivex: display bad block offset in hexRichard Jones2010-01-281-1/+1
|
* hivex: hive type in vk-record is an unsigned 32 bit intRichard Jones2010-01-281-1/+1
|
* hivex: Add missing le32toh conversion around field access.Richard Jones2010-01-281-3/+3
| | | | | This was missing. It only worked because we test on a little endian platform.
* hivex: Clarify some more fields.Richard Jones2010-01-281-2/+3
| | | | Taken from sentinelchicken.com documentation.
* hivex: Modify children/values functions to return intermediate blocks.Richard Jones2010-01-281-70/+168
| | | | | | | | | | | 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.
* hivex: Add value_any callback to the visitor.Richard Jones2010-01-283-83/+101
| | | | | | | | | | 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.
* hivex: Move header checksum code into a function.Richard Jones2010-01-281-8/+16
| | | | This function can be reused later.