亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? libewf_file.c

?? sleuthit-2.09 一個磁盤的工具集
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * libewf file handling * * Copyright (c) 2006-2007, Joachim Metz <forensics@hoffmannbv.nl>, * Hoffmann Investigations. All rights reserved. * * Refer to AUTHORS for acknowledgements. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, *   this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, *   this list of conditions and the following disclaimer in the documentation *   and/or other materials provided with the distribution. * - Neither the name of the creator, related organisations, nor the names of *   its contributors may be used to endorse or promote products derived from *   this software without specific prior written permission. * - All advertising materials mentioning features or use of this software *   must acknowledge the contribution by people stated in the acknowledgements. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, COMPANY AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */#include "libewf_includes.h"#if HAVE_UNISTD_H#include <unistd.h>#endif#include <errno.h>#include <libewf/libewf_definitions.h>#include "libewf_common.h"#include "libewf_endian.h"#include "libewf_notify.h"#include "libewf_file.h"#include "libewf_offset_table.h"#include "libewf_read.h"#include "libewf_section_list.h"#include "libewf_segment_table.h"#include "libewf_string.h"#include "libewf_write.h"#include "ewf_compress.h"#include "ewf_crc.h"#include "ewf_digest_hash.h"#include "ewf_file_header.h"#include "ewf_header.h"#include "ewf_section.h"#include "ewf_volume.h"#include "ewf_table.h"/* Return the library version */const LIBEWF_CHAR *libewf_get_version( void ){	return( (const LIBEWF_CHAR *) LIBEWF_VERSION );}#if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_CHARACTER_SUPPORT_FUNCTIONS )/* Detects if a file is an EWF file (check for the EWF file signature) * Returns 1 if true, 0 if not, or -1 on error */int8_t libewf_check_file_signature( const wchar_t *filename ){	uint8_t signature[ 8 ];	wchar_t *error_string = NULL;	ssize_t count         = 0;	int file_descriptor   = 0;	if( filename == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: invalid filename.\n" );		return( -1 );	}	file_descriptor = libewf_common_wide_open( filename, LIBEWF_OPEN_READ );	if( file_descriptor < 0 )	{		error_string = libewf_common_wide_strerror( errno );		if( error_string == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to open file: %ls.\n", filename );		}		else		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to open file: %ls with error: %ls.\n", filename, error_string );			libewf_common_free( error_string );		}		return( -1 );	}	count = libewf_common_read( file_descriptor, signature, 8 );	if( libewf_common_close( file_descriptor ) != 0 )	{		error_string = libewf_common_strerror( errno );		if( error_string == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to close file: %ls.\n", filename );		}		else		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to close file: %ls with error: %ls.\n", filename, error_string );			libewf_common_free( error_string );		}		return( -1 );	}	if( count <= -1 )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: error reading signature from file: %ls.\n", filename );		return( -1 );	}	else if( count != 8 )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to read signature from file: %ls.\n", filename );		return( -1 );	}	return( ewf_file_header_check_signature( signature ) );}#else/* Detects if a file is an EWF file (check for the EWF file signature) * Returns 1 if true, 0 if not, or -1 on error */int8_t libewf_check_file_signature( const char *filename ){	uint8_t signature[ 8 ];	char *error_string  = NULL;	ssize_t count       = 0;	int file_descriptor = 0;	if( filename == NULL )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: invalid filename.\n" );		return( -1 );	}	file_descriptor = libewf_common_open( filename, LIBEWF_OPEN_READ );	if( file_descriptor < 0 )	{		error_string = libewf_common_strerror( errno );		if( error_string == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to open file: %s.\n", filename );		}		else		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to open file: %s with error: %s.\n", filename, error_string );			libewf_common_free( error_string );		}		return( -1 );	}	count = libewf_common_read( file_descriptor, signature, 8 );	if( libewf_common_close( file_descriptor ) != 0 )	{		error_string = libewf_common_strerror( errno );		if( error_string == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to close file: %s.\n", filename );		}		else		{			LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to close file: %s with error: %s.\n", filename, error_string );			libewf_common_free( error_string );		}		return( -1 );	}	if( count <= -1 )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: error reading signature from file: %s.\n", filename );		return( -1 );	}	else if( count != 8 )	{		LIBEWF_WARNING_PRINT( "libewf_check_file_signature: unable to read signature from file: %s.\n", filename );		return( -1 );	}	return( ewf_file_header_check_signature( signature ) );}#endif#if defined( HAVE_WIDE_CHARACTER_TYPE ) && defined( HAVE_WIDE_CHARACTER_SUPPORT_FUNCTIONS )/* Opens EWF file(s) * For reading files should contain all filenames that make up an EWF image * For writing files should contain the base of the filename, extentions like .e01 will be automatically added * Returns a pointer to the new instance of handle, NULL on error */LIBEWF_HANDLE *libewf_open( wchar_t * const filenames[], uint16_t file_amount, uint8_t flags ){	EWF_FILE_HEADER file_header;	LIBEWF_INTERNAL_HANDLE *internal_handle = NULL;	wchar_t *error_string                   = NULL;	uint32_t iterator                       = 0;	uint16_t fields_segment                 = 0;	int file_descriptor                     = 0;	if( ( flags == LIBEWF_OPEN_READ ) || ( flags == LIBEWF_OPEN_READ_WRITE ) )	{		/* 1 additional entry required because		 * entry [ 0 ] is not used for reading		 */		handle = libewf_internal_handle_alloc( ( file_amount + 1 ), flags );		if( handle == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_open: unable to create handle.\n" );			return( NULL );		}		if( internal_handle->segment_table == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_open: invalid handle - missing segment table.\n" );			libewf_internal_handle_free( handle );			return( NULL );		}		for( iterator = 0; iterator < file_amount; iterator++ )		{			file_descriptor = libewf_common_wide_open( filenames[ iterator ], flags );			if( file_descriptor == -1 )			{				error_string = libewf_common_wide_strerror( errno );				if( error_string == NULL )				{					LIBEWF_WARNING_PRINT( "libewf_open: unable to open file: %s.\n", filenames[ iterator ] );				}				else				{					LIBEWF_WARNING_PRINT( "libewf_open: unable to open file: %s with error: %s.\n", filenames[ iterator ], error_string );					libewf_common_free( error_string );				}				libewf_internal_handle_free( handle );				return( NULL );			}			if( ewf_file_header_read( &file_header, file_descriptor ) <= -1 )			{				LIBEWF_WARNING_PRINT( "libewf_open: invalid file header in: %s.\n", filenames[ iterator ] );				libewf_internal_handle_free( handle );				return( NULL );			}			if( ewf_file_header_check_signature( file_header.signature ) == 0 )			{				LIBEWF_WARNING_PRINT( "libewf_open: file signature does not match.\n" );				libewf_internal_handle_free( handle );				return( NULL );			}			if( libewf_endian_convert_16bit( &fields_segment, file_header.fields_segment ) != 1 )			{				LIBEWF_WARNING_PRINT( "libewf_open: unable to convert fields segment value.\n" );				libewf_internal_handle_free( handle );				return( NULL );			}			LIBEWF_VERBOSE_PRINT( "libewf_open: added segment file: %s with file descriptor: %d with segment number: %" PRIu16 ".\n",				filenames[ iterator ], file_descriptor, fields_segment );			if( libewf_segment_table_set_wide_filename( internal_handle->segment_table, fields_segment, filenames[ iterator ], libewf_common_string_length( filenames[ iterator ] ) ) != 1 )			{				LIBEWF_WARNING_PRINT( "libewf_open: unable to set filename in segment table.\n" );				libewf_internal_handle_free( handle );				return( NULL );			}			if( libewf_segment_table_set_file_descriptor( internal_handle->segment_table, fields_segment, file_descriptor ) != 1 )			{				LIBEWF_WARNING_PRINT( "libewf_open: unable to set file descriptor in segment table.\n" );				libewf_internal_handle_free( handle );				return( NULL );			}		}		if( libewf_read_build_index( handle ) != 1 )		{			LIBEWF_WARNING_PRINT( "libewf_open: unable to create index.\n" );			libewf_internal_handle_free( handle );			return( NULL );		}	}	else if( flags == LIBEWF_OPEN_WRITE )	{		/* Allocate 2 entries		 * entry [ 0 ] is used for the base filename		 */		handle = libewf_internal_handle_alloc( 1, flags );		if( handle == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_open: unable to create handle.\n" );			return( NULL );		}		if( internal_handle->segment_table == NULL )		{			LIBEWF_WARNING_PRINT( "libewf_open: invalid handle - missing segment table.\n" );			libewf_internal_handle_free( handle );			return( NULL );		}		if( libewf_segment_table_set_wide_filename( internal_handle->segment_table, 0, filenames[ iterator ], libewf_common_wide_string_length( filenames[ iterator ] ) ) != 1 )		{			LIBEWF_WARNING_PRINT( "libewf_open: unable to set filename in segment table.\n" );			libewf_internal_handle_free( handle );			return( NULL );		}		if( libewf_segment_table_set_file_descriptor( internal_handle->segment_table, 0, -1 ) != 1 )		{			LIBEWF_WARNING_PRINT( "libewf_open: unable to set file descriptor in segment table.\n" );			libewf_internal_handle_free( handle );			return( NULL );		}	}	else	{		LIBEWF_WARNING_PRINT( "libewf_open: unsupported flags.\n" );		return( NULL );	}	LIBEWF_VERBOSE_PRINT( "libewf_open: open successful.\n" );	return( (LIBEWF_HANDLE *) handle );}#else/* Opens EWF file(s) * For reading files should contain all filenames that make up an EWF image * For writing files should contain the base of the filename, extentions like .e01 will be automatically added * Returns a pointer to the new instance of handle, NULL on error */LIBEWF_HANDLE *libewf_open( char * const filenames[], uint16_t file_amount, uint8_t flags ){	EWF_FILE_HEADER file_header;	LIBEWF_INTERNAL_HANDLE *internal_handle = NULL;	char *error_string                      = NULL;	uint32_t iterator                       = 0;	uint16_t fields_segment                 = 0;	int file_descriptor                     = 0;	if( ( flags == LIBEWF_OPEN_READ ) || ( flags == LIBEWF_OPEN_READ_WRITE ) )	{		/* 1 additional entry required because		 * entry [ 0 ] is not used for reading		 */		internal_handle = libewf_internal_handle_alloc( ( file_amount + 1 ), flags );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩国产欧美在线视频| 国产午夜亚洲精品羞羞网站| 一区二区激情视频| 91色porny在线视频| 亚洲乱码国产乱码精品精98午夜| 91麻豆自制传媒国产之光| 亚洲三级在线观看| 欧美日韩国产综合视频在线观看| 免费三级欧美电影| 久久精品亚洲精品国产欧美| 成人av片在线观看| 亚洲国产精品一区二区尤物区| 欧美精品久久99| 韩国精品一区二区| 亚洲日本va午夜在线影院| 欧美日韩日本视频| 国产一区福利在线| 亚洲免费观看高清完整版在线观看| 欧美性生交片4| 精品在线亚洲视频| 国产精品国产三级国产普通话蜜臀| 91色.com| 91在线视频播放| 成人欧美一区二区三区在线播放| 91传媒视频在线播放| 久久精品噜噜噜成人88aⅴ| 国产欧美精品一区二区色综合| 在线一区二区三区四区五区| 图片区小说区国产精品视频| 亚洲精品一线二线三线无人区| 本田岬高潮一区二区三区| 婷婷开心激情综合| 国产精品嫩草99a| 6080yy午夜一二三区久久| 国产精品一区二区黑丝| 亚洲福中文字幕伊人影院| 久久久影院官网| 欧美日韩久久一区二区| 国产+成+人+亚洲欧洲自线| 亚洲国产欧美一区二区三区丁香婷| 久久先锋资源网| 欧美日韩中文另类| 99精品视频在线免费观看| 蜜桃视频一区二区三区| 亚洲欧美激情视频在线观看一区二区三区 | 国产麻豆91精品| 一级特黄大欧美久久久| 国产欧美日韩在线观看| 欧美一区二区三区在线电影 | 麻豆精品视频在线观看视频| 一区二区三区在线观看国产| 天天做天天摸天天爽国产一区| 久久精品一区二区三区av| 欧美肥妇bbw| 91精彩视频在线观看| 懂色一区二区三区免费观看| 久久国产精品无码网站| 性久久久久久久久| 尤物在线观看一区| 中文字幕一区二区视频| 国产欧美日韩在线看| 精品国产在天天线2019| 在线播放91灌醉迷j高跟美女 | 国产成人av电影在线观看| 日韩中文字幕1| 亚洲精品va在线观看| 日韩一区在线免费观看| 国产女人18水真多18精品一级做| 日韩三级伦理片妻子的秘密按摩| 欧美日韩日日摸| 欧美精品自拍偷拍动漫精品| 欧美性生活影院| 欧美日韩另类国产亚洲欧美一级| 欧洲一区二区三区免费视频| 色就色 综合激情| 在线精品视频一区二区三四| 91高清视频在线| 欧美日韩国产首页| 欧美美女黄视频| 91麻豆精品国产无毒不卡在线观看| 欧美三级中文字幕在线观看| 欧美日本高清视频在线观看| 欧美日韩激情在线| 欧美一区二区三区婷婷月色| 欧美一个色资源| 欧美成人性福生活免费看| 欧美电影免费观看完整版| www一区二区| 亚洲国产成人一区二区三区| 国产精品高潮呻吟久久| 亚洲色图在线播放| 亚洲午夜成aⅴ人片| 日韩电影在线免费看| 久久99在线观看| 大陆成人av片| 91视视频在线直接观看在线看网页在线看| www.亚洲色图| 欧美日韩一区二区在线视频| 91精品国产综合久久精品性色| 日韩一区二区精品在线观看| 久久新电视剧免费观看| 最新久久zyz资源站| 亚洲成a人v欧美综合天堂下载| 日韩激情在线观看| 国产丶欧美丶日本不卡视频| 91在线一区二区| 欧美精品一二三| 久久精品视频免费观看| 亚洲人xxxx| 美女高潮久久久| 99久久精品久久久久久清纯| 久久久精品综合| 中文字幕一区二区在线观看| 日日骚欧美日韩| 大胆欧美人体老妇| 欧美高清视频www夜色资源网| 精品国产a毛片| 亚洲欧美偷拍三级| 久久av老司机精品网站导航| 91亚洲国产成人精品一区二三| 欧美美女一区二区三区| 国产日韩欧美电影| 视频一区二区三区入口| 国产成a人无v码亚洲福利| 欧美色视频一区| 中文字幕不卡在线| 丝袜亚洲另类欧美| eeuss影院一区二区三区| 日韩一级片在线观看| 亚洲视频每日更新| 国产综合色精品一区二区三区| 在线影视一区二区三区| 久久久国际精品| 日本伊人色综合网| 99久久精品免费看国产免费软件| 欧美tickling挠脚心丨vk| 一级做a爱片久久| 成人黄页毛片网站| 久久先锋影音av鲁色资源网| 五月天网站亚洲| 色欧美片视频在线观看| 国产女人18毛片水真多成人如厕 | 色系网站成人免费| 国产午夜精品一区二区三区四区| 五月天中文字幕一区二区| 成人av高清在线| 久久久国产综合精品女国产盗摄| 日本亚洲视频在线| 欧美日韩一本到| 亚洲精品乱码久久久久久日本蜜臀 | 欧美va在线播放| 亚洲bdsm女犯bdsm网站| 99麻豆久久久国产精品免费 | 日韩高清不卡在线| 欧美亚洲另类激情小说| 亚洲另类春色校园小说| 成人97人人超碰人人99| 国产亚洲精品免费| 国内精品免费**视频| 欧美成人a∨高清免费观看| 五月综合激情网| 欧美精三区欧美精三区| 午夜婷婷国产麻豆精品| 欧美亚洲国产怡红院影院| 一区二区三区在线观看动漫| 色先锋资源久久综合| 亚洲欧美日韩成人高清在线一区| 91视频在线观看免费| 国产精品久久久久久久久久久免费看 | 国产欧美一区二区在线| 国产精品自在欧美一区| 国产亚洲精品aa| 国内精品久久久久影院一蜜桃| 欧美精品一区二区三区在线 | 丝袜a∨在线一区二区三区不卡| 欧美视频你懂的| 视频一区中文字幕国产| 欧美一级搡bbbb搡bbbb| 精品一区二区免费| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美日韩在线免费视频| 性久久久久久久久| 日韩精品一区二| 国产成人精品免费网站| 一区视频在线播放| 欧美午夜精品久久久久久孕妇| 亚洲网友自拍偷拍| 日韩三级免费观看| 国产精品18久久久久| 蜜臀久久99精品久久久画质超高清| 91精品国产高清一区二区三区蜜臀 | 欧美一区二区视频在线观看| 久久99国产精品尤物| 欧美国产精品劲爆| 91美女片黄在线| 免费观看30秒视频久久| 国产视频一区二区在线观看| 91网站视频在线观看| 婷婷六月综合亚洲| 日本一区二区三区dvd视频在线|