| 
    The Sleuth Kit Framework
    4.1
    
   | 
 
A Sleuth Kit implementation of the TskImageFile interface. More...
#include <TskImageFileTsk.h>
  
 Public Member Functions | |
| virtual void | close () | 
| Close the disk image.  | |
| virtual int | closeFile (const int handle) | 
| Closes an opened file.  More... | |
| virtual int | extractFiles () | 
| Analyze the volume and file systems in the opened images and populate the TskImgDB instance registered with TskServices.  More... | |
| virtual int | getByteData (const uint64_t byte_start, const uint64_t byte_len, char *buffer) | 
| Return the data located at the given byte offset in the disk image.  More... | |
| virtual std::vector< std::string > | getFileNames () const | 
| Return the file name(s) that make up the image.  | |
| virtual std::vector< std::wstring > | getFileNamesW () const | 
| virtual int | getSectorData (const uint64_t sect_start, const uint64_t sect_len, char *buffer) | 
| Return the data located at the given sector offset in the disk image.  More... | |
| virtual int | open () | 
| open the images at the paths saved in ImgDB  More... | |
| virtual int | open (const TSK_TCHAR *imageFile, const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens a single (non-split) disk image file so that it can be read.  More... | |
| virtual int | open (const int numberOfImages, const TSK_TCHAR *const imageFile[], const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens one or more disk image files so that they can be read.  More... | |
| virtual int | open (const std::string &imageFile, const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens a single (non-split) disk image file so that it can be read.  More... | |
| virtual int | open (const std::wstring &imageFile, const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens a single (non-split) disk image file so that it can be read.  More... | |
| virtual int | open (const std::vector< std::string > &imageFile, const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens one or more disk image files so that they can be read.  More... | |
| virtual int | open (const std::vector< std::wstring > &imageFile, const TSK_IMG_TYPE_ENUM imageType=TSK_IMG_TYPE_DETECT, const unsigned int sectorSize=0) | 
| Opens one or more disk image files so that they can be read.  More... | |
| virtual int | openFile (const uint64_t fileId) | 
| Provides access to the content of a specific file that was extracted from the disk image.  More... | |
| virtual int | readFile (const int handle, const TSK_OFF_T byte_offset, const size_t byte_len, char *buffer) | 
| Reads content of a file that was opened with openFile().  More... | |
  Public Member Functions inherited from TskImageFile | |
| TskImageFile () | |
| You must call one of the open() methods after creating the object.  | |
A Sleuth Kit implementation of the TskImageFile interface.
TskImageFile defines an interface for interacting with disk images. TskImageFileTsk is an implementation of that interface that uses The Sleuth Kit
      
  | 
  virtual | 
Closes an opened file.
| handle | File handle that was returned by an earlier call to openFile() | 
Implements TskImageFile.
References LOGERROR, openFile(), and tsk_fs_file_close().
Referenced by close().
      
  | 
  virtual | 
Analyze the volume and file systems in the opened images and populate the TskImgDB instance registered with TskServices.
This will not perform file carving.
Implements TskImageFile.
References TskImgDB::addImageName(), TSKAutoImpl::extractFiles(), TSK_IMG_INFO::itype, LOGERROR, TSKAutoImpl::scanImgForFs(), TSK_IMG_INFO::sector_size, and tsk_error_get().
      
  | 
  virtual | 
Return the data located at the given byte offset in the disk image.
| byte_start | Byte offset into image from which to return data | 
| byte_len | Number of bytes to read | 
| buffer | A buffer into which data will be placed. Must be at least byte_len large | 
Implements TskImageFile.
References LOGERROR, open(), tsk_error_get(), and tsk_img_read().
Referenced by getSectorData().
      
  | 
  virtual | 
Return the data located at the given sector offset in the disk image.
| sect_start | Sector offset into image from which to return data | 
| sect_len | Number of sectors to read | 
| buffer | A buffer into which data will be placed. Must be at least len * 512 large | 
Implements TskImageFile.
References getByteData().
      
  | 
  virtual | 
open the images at the paths saved in ImgDB
Implements TskImageFile.
References close(), and LOGERROR.
Referenced by getByteData(), open(), and openFile().
      
  | 
  virtual | 
Opens a single (non-split) disk image file so that it can be read.
| imageFile | The path to the image file | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References close(), and TskUtilities::toUTF8().
      
  | 
  virtual | 
Opens one or more disk image files so that they can be read.
e UTF8, then consider
| numberOfImages | The number of images to open (will be > 1 for split images). | 
| imageFile | The path to the image files (the number of files must be equal to num_img and they must be in a sorted order) | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References close(), and TskUtilities::toUTF8().
      
  | 
  virtual | 
Opens a single (non-split) disk image file so that it can be read.
This version always takes a UTF-8 encoding of the disk image.
| imageFile | The UTF-8 path to the image file | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References close().
      
  | 
  virtual | 
Opens a single (non-split) disk image file so that it can be read.
| imageFile | The path to the image file | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References open(), and TskUtilities::toUTF8().
      
  | 
  virtual | 
Opens one or more disk image files so that they can be read.
This version always takes a UTF-8 encoding of the image files.
| imageFile | A vector of UTF-8 encoded image files | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References close().
      
  | 
  virtual | 
Opens one or more disk image files so that they can be read.
| imageFile | A vector of image files | 
| imageType | The disk image type (can be autodetection) | 
| sectorSize | Size of device sector in bytes (or 0 for default) | 
Implements TskImageFile.
References close(), and TskUtilities::toUTF8().
      
  | 
  virtual | 
Provides access to the content of a specific file that was extracted from the disk image.
| fileId | ID of the file (can be found in database) | 
Implements TskImageFile.
References LOGERROR, open(), tsk_error_get(), TSK_FS_ATTR_TYPE_NOT_FOUND, tsk_fs_file_attr_get_id(), tsk_fs_file_open_meta(), tsk_fs_open_img(), and TSK_FS_TYPE_DETECT.
Referenced by closeFile(), and readFile().
      
  | 
  virtual | 
Reads content of a file that was opened with openFile().
| handle | File handle that was returned by an earlier call to openFile() | 
| byte_offset | Starting byte offset from which to read data | 
| byte_len | The number of bytes to read | 
| buffer | A buffer into which data will be placed. Must be at least byte_len bytes. | 
Implements TskImageFile.
References LOGERROR, openFile(), tsk_error_get(), tsk_fs_attr_read(), TSK_FS_FILE_READ_FLAG_NONE, and TSK_FS_META_FLAG_ALLOC.
Copyright © 2011-2013 Brian Carrier.  (carrier -at- sleuthkit -dot- org)
 
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.