[Libguestfs] extract NTFS Master File Table for analysis

Richard W.M. Jones rjones at redhat.com
Fri Feb 19 10:51:41 UTC 2016


On Thu, Feb 18, 2016 at 09:41:51PM +0200, noxdafox wrote:
> All of this to say I'd like to add the possibility of extracting
> files via their inode. This functionality has the advantage of not
> requiring the FS to be mounted. Would libguestfs benefit from this?
> 
> If so how should I proceed? Which API names to use?

We generally tend to stick to API names which are the same as the
underlying utility, so "ntfscat".  In this case however ntfscat has
lots of different modes, so we'd use a name like "ntfscat_i" for this
API.

> Most straightforward would be something like:
> 
>   ntfsicat(device, inode)

  { defaults with
    name = "ntfscat_i";
    style = RErr, [Mountable "device"; Int64 "inode"; FileOut "filename"], [];
    ...
  }

seems like the right sort of API to use.

> I guess also linux guest disks would benefit from this but this
> requires a bit more research.

Not sure if there is any way to download a file by inode from a Linux
filesystem.  But it doesn't matter for this case.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list