以编程方式从C中的dd图像中提取文件(Programmatically extract files from dd image in C)

编程入门 行业动态 更新时间:2024-10-23 19:32:38
以编程方式从C中的dd图像中提取文件(Programmatically extract files from dd image in C)

我有一些dd图像,我想知道使用C从这些图像中提取文件的最佳方法。图像是混合文件系统(fat32,ntfs,ext2 / 3),进行提取的主机是Ubuntu框,所以你可以假设内核头文件和GNU C库等。

原生本身是最好的,但做这项工作的外部图书馆也没问题。 一个例子的链接将是完美的。

I have a few dd images and I wanted to know the best way of extracting files out of these using C. The images are of mixed file systems (fat32, ntfs, ext2/3) and the host machine doing the extraction would be an Ubuntu box, so you can assume kernel headers and GNU C library, etc.

Natively would be best, but external libraries that do the job would also be fine. A link to an example would be perfect.

最满意答案

这是一项重大的努力。 您必须为NTFS,FAT和EXT2重新实现文件系统驱动程序。 我已经为FAT和NTFS做了这个,但是花了两年多的时间,尽管其中大部分是逆向工程NTFS。

考虑使用mount命令的file mount选项,这样您就可以使用Ubuntu文件系统驱动程序,而不是重新发明非常大的轮子。 然后,您可以仔细阅读已安装的文件系统。

This is a significant effort. You'd have to essentially reimplement filesystem drivers for NTFS, FAT, and EXT2. I've done this for FAT and NTFS, but it took more than two years, though much of that was reverse engineering NTFS.

Consider using the file mount option of the mount command so you can use the Ubuntu filesystem drivers and not reinvent the significantly large wheel. Then you can peruse the mounted filesystems.

更多推荐

本文发布于:2023-07-04 11:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1023593.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   方式   文件   dd   image

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!