📄 skins_windows.txt
字号:
Windows Implementation Sleuth Kit Implementation Notes http://www.sleuthkit.org Brian Carrier Last Updated: Sept 2008INTRODUCTION=======================================================================Version 2.06 of The Sleuth Kit included support for Microsoft Windows. There were several design changes that needed to occur so that TSK couldrun on both Windows and Unix systems. The biggest change, and the focus of this document, was how Unicode and non-English characters were dealt with.PROBLEM =======================================================================Unicode characters can be stored in multiple formats. Unix systemsuse UTF-8, which stores the characters in 1, 2, 3, or 4 bytes. Windowsusers UTF-16, which stores characters in 2 or 4 bytes. Because ofthis difference, the input to and output of TSK is different on Windowsversus Unix.SOLUTION=======================================================================The solution to this problem was to create many C #defines that mapa general name to the specific function or type that is used on eachplatform. Internally, all code uses the UTF-8 encoding. This meansthat the input and output may need to be converted on Windows.The input data consists of image file names, image and file system types,and addresses. There is no need to convert the file names because thenative system calls need the same format as the input. For the image,volume, and file system types, I assume that they will always be inEnglish and therefore they are easily converted to ASCII on Windows.Lastly, addresses in a string form are easy to convert to an integerand this is done using either UTF-8 or UTF-16 atoi-type functions.For output, the printf and fprintf functions were wrapped withTSK-specific versions. The wrappers will convert the UTF-8 code toUTF-16, if needed, and then print the resulting data.Therefore, few changes occurred to the volume and file system code exceptthat the printf wrappers were used. The command line tools needed tobe changed to handle the 2-byte TCHAR values as input and to use the T*functions, which map to either UTF-8 or UTF-16 functions.Update: When support was added for the mingw cross-compiler, some ofthe things had to be changed. Specifically, the biggest change wasthat the command line arguments in the tools have to be obtained viaGetCommandLineW() instead of using wmain() because mingw does notsupport wmain().-----------------------------------------------------------------------Send documentation updates to: <doc-updates at sleuthkit dot org>Copyright (c) 2006-2008 by Brian Carrier. All Rights Reserved
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -