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

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

?? ewfcommon.c

?? sleuthit-2.09 一個磁盤的工具集
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * ewfcommon * Common functions for the ewf tools * * 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/libewf_includes.h"#include <errno.h>#if defined( HAVE_STDLIB_H )#include <stdlib.h>#endif#if defined( HAVE_STRING_H )#include <string.h>#endif#if defined( HAVE_SYS_UTSNAME_H )#include <sys/utsname.h>#endif#if defined( HAVE_ZLIB_H ) && defined( HAVE_LIBZ )#include <zlib.h>#endif#if defined( HAVE_OPENSSL_OPENSSLV_H ) && defined( HAVE_LIBCRYPTO )#include <openssl/opensslv.h>#endif#if defined( HAVE_UUID_UUID_H ) && defined( HAVE_LIBUUID )#include <uuid/uuid.h>#endif#include <libewf.h>#include "../libewf/libewf_common.h"#include "../libewf/libewf_notify.h"#include "../libewf/libewf_string.h"#include "../libewf/ewf_digest_hash.h"#if defined( HAVE_CHUNK_CACHE_PASSTHROUGH )#include "../libewf/libewf_internal_handle.h"#include "../libewf/ewf_crc.h"#endif#include "ewfcommon.h"/* EWFCOMMON_BUFFER_SIZE definition is intended for testing purposes */#ifndef EWFCOMMON_BUFFER_SIZE#define EWFCOMMON_BUFFER_SIZE	chunk_size#endif#ifndef LIBEWF_OPERATING_SYSTEM#define LIBEWF_OPERATING_SYSTEM "Unknown"#endif/* Determines the current platform, or NULL on error */LIBEWF_CHAR *ewfcommon_determine_operating_system( void ){	LIBEWF_CHAR *string    = NULL;	char *operating_system = NULL;	uint32_t length        = 0;#ifdef HAVE_SYS_UTSNAME_H	struct utsname utsname_buffer;	/* Determine the operating system	 */	if( uname( &utsname_buffer ) == 0 )	{		operating_system = utsname_buffer.sysname;	}	else	{		operating_system = "Undetermined";	}#else	operating_system = LIBEWF_OPERATING_SYSTEM;#endif	length = (uint32_t) strlen( operating_system ) + 1;	string = (LIBEWF_CHAR *) libewf_common_alloc( LIBEWF_CHAR_SIZE * length );	if( ( string != NULL ) && ( ewfcommon_copy_libewf_char_from_char_t( string, operating_system, length ) != 1 ) )	{		libewf_common_free( string );			return( NULL );	}	return( string );}/* Determines the GUID * Returns 1 if successful, or -1 on error */int8_t ewfcommon_determine_guid( uint8_t *guid, uint8_t libewf_format ){	if( guid == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_determine_guid: invalid GUID.\n" );		return( -1 );	}#if defined(HAVE_UUID_UUID_H) && defined(HAVE_LIBUUID)#ifdef HAVE_UUID_GENERATE_RANDOM	if( ( libewf_format == LIBEWF_FORMAT_ENCASE5 )	 || ( libewf_format == LIBEWF_FORMAT_ENCASE6 )	 || ( libewf_format == LIBEWF_FORMAT_EWFX ) )	{		uuid_generate_random( guid );	}#endif#ifdef HAVE_UUID_GENERATE_TIME	if( ( libewf_format == LIBEWF_FORMAT_LINEN5 )	 || ( libewf_format == LIBEWF_FORMAT_LINEN6 ) )	{		uuid_generate_time( guid );	}#endif#endif	return( 1 );}/* Determines the units strings of a certain factor value */LIBEWF_CHAR *ewfcommon_determine_units_string( int factor ){	switch( factor )	{		case 0:			return( _S_LIBEWF_CHAR( "B" ) );		case 1:			return( _S_LIBEWF_CHAR( "kB" ) );		case 2:			return( _S_LIBEWF_CHAR( "MB" ) );		case 3:			return( _S_LIBEWF_CHAR( "GB" ) );		case 4:			return( _S_LIBEWF_CHAR( "TB" ) );		case 5:			return( _S_LIBEWF_CHAR( "PB" ) );		case 6:			return( _S_LIBEWF_CHAR( "EB" ) );		case 7:			return( _S_LIBEWF_CHAR( "ZB" ) );		default :			break;	}	return( _S_LIBEWF_CHAR( "?B" ) );}/* Determines the human readable size as a string * Returns a pointer to the new instance, NULL on error */LIBEWF_CHAR *ewfcommon_determine_human_readable_size_string( uint64_t size ){	LIBEWF_CHAR *size_string  = NULL;	LIBEWF_CHAR *units_string = NULL;	int8_t remainder          = -1;	uint8_t factor            = 0;	uint64_t new_size         = 0;	while( size >= 1024 )	{		factor++;		new_size = size / 1024;		if( new_size < 10 )		{			remainder = (uint8_t) ( ( size % 1024 ) / 100 );		}		size = new_size;	}	if( factor > 7 )	{		LIBEWF_WARNING_PRINT( "ewfcommon_determine_human_readable_size_string: a size with a factor larger than 7 currently not supported.\n" );		return( NULL );	}	/* The string has a maximum of 7 characters + end of string '\0'	 */	size_string = (LIBEWF_CHAR *) libewf_common_alloc( LIBEWF_CHAR_SIZE * 8 );	if( size_string == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_determine_human_readable_size_string: unable to create size string.\n" );		return( NULL );	}	units_string = ewfcommon_determine_units_string( (int) factor );	if( remainder > 9 )	{		remainder = 9;	}	if( remainder >= 0 )	{		libewf_string_snprintf( size_string, 8, _S_LIBEWF_CHAR( "%" ) _S_LIBEWF_CHAR( PRIu64 ) _S_LIBEWF_CHAR( ".%" ) _S_LIBEWF_CHAR( PRIu8 ) _S_LIBEWF_CHAR( " %" ) _S_LIBEWF_CHAR( PRIs_EWF ), size, remainder, units_string );	}	else	{		libewf_string_snprintf( size_string, 8, _S_LIBEWF_CHAR( "%" ) _S_LIBEWF_CHAR( PRIu64 ) _S_LIBEWF_CHAR( " %" ) _S_LIBEWF_CHAR( PRIs_EWF ), size, units_string );	}	return( size_string );}/* Copies the source string (of CHAR_T) into the destination string for a certain length * Terminates the destination string with \0 at ( length - 1 ) * Returns 1 if successful, -1 on error */int8_t ewfcommon_copy_libewf_char_from_char_t( LIBEWF_CHAR *destination, const CHAR_T *source, size_t length ){	ssize_t conversion = (ssize_t) ( sizeof( LIBEWF_CHAR ) - sizeof( CHAR_T ) );	size_t iterator    = 0;	if( source == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_copy_libewf_char_from_char_t: invalid source.\n" );		return( -1 );	}	if( destination == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_copy_libewf_char_from_char_t: invalid destination.\n" );		return( -1 );	}	for( iterator = 0; iterator < length; iterator++ )	{		if( conversion == 0 )		{			destination[ iterator ] = (LIBEWF_CHAR) source[ iterator ];		}#ifdef HAVE_WIDE_CHARACTER_TYPE		else if( conversion > 0 )		{			destination[ iterator ] = (LIBEWF_CHAR) btowc( (int) source[ iterator ] );		}		else if( conversion < 0 )		{			destination[ iterator ] = (LIBEWF_CHAR) wctob( (wint_t) source[ iterator ] );			/* If character is out of the basic ASCII range use '_' as a place holder			 */			if( destination[ iterator ] == EOF )			{				destination[ iterator ] = '_';			}		}#endif		else		{			LIBEWF_WARNING_PRINT( "ewfcommon_copy_libewf_char_from_char_t: unsupported converstion.\n" );			return( -1 );		}	}	destination[ length - 1 ] = (LIBEWF_CHAR) '\0';	return( 1 );}/* Copies the source string into the destination string (of CHAR_T) for a certain length * Terminates the destination string with \0 at ( length - 1 ) * Returns 1 if successful, -1 on error */int8_t ewcommon_copy_libewf_char_to_char_t( const LIBEWF_CHAR *source, CHAR_T *destination, size_t length ){	ssize_t conversion = (ssize_t) ( sizeof( LIBEWF_CHAR ) - sizeof( CHAR_T ) );	size_t iterator    = 0;	if( source == NULL )	{		LIBEWF_WARNING_PRINT( "ewcommon_copy_libewf_char_to_char_t: invalid source.\n" );		return( -1 );	}	if( destination == NULL )	{		LIBEWF_WARNING_PRINT( "ewcommon_copy_libewf_char_to_char_t: invalid destination.\n" );		return( -1 );	}	for( iterator = 0; iterator < length; iterator++ )	{		if( conversion == 0 )		{			destination[ iterator ] = (CHAR_T) source[ iterator ];		}#ifdef HAVE_WIDE_CHARACTER_TYPE		else if( conversion > 0 )		{			destination[ iterator ] = (CHAR_T) wctob( (wint_t) source[ iterator ] );			/* If character is out of the basic ASCII range use '_' as a place holder			 */			if( destination[ iterator ] == EOF )			{				destination[ iterator ] = '_';			}		}		else if( conversion < 0 )		{			destination[ iterator ] = (CHAR_T) btowc( (int) source[ iterator ] );		}#endif		else		{			LIBEWF_WARNING_PRINT( "ewcommon_copy_libewf_char_to_char_t: unsupported converstion.\n" );			return( -1 );		}	}	destination[ length - 1 ] = (CHAR_T) '\0';	return( 1 );}/* Get variable input from the user * with a maximum of 1023 characters */LIBEWF_CHAR *ewfcommon_get_user_input_variable( FILE *stream, LIBEWF_CHAR *request_string ){	LIBEWF_CHAR user_input_buffer[ 1024 ];	LIBEWF_CHAR *user_input_buffer_ptr = &user_input_buffer[ 0 ];	LIBEWF_CHAR *user_input            = NULL;	LIBEWF_CHAR *end_of_input          = NULL;	size_t input_length                = 0;	if( stream == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_get_user_input_variable: Invalid output stream.\n" );		return( NULL );	}	if( request_string == NULL )	{		LIBEWF_WARNING_PRINT( "ewfcommon_get_user_input_variable: Invalid request string.\n" );		return( NULL );	}	while( 1 )	{		fprintf( stream, "%" PRIs_EWF ": ", request_string );		user_input_buffer_ptr = libewf_string_get_from_stream( user_input_buffer_ptr, 1023, stdin );		if( user_input_buffer_ptr != NULL )		{			end_of_input = libewf_string_search( user_input_buffer_ptr, (LIBEWF_CHAR) '\n', 1023 );			if( end_of_input == NULL )			{				return( NULL );			}			input_length = (uint32_t) ( end_of_input - user_input_buffer_ptr );			if( input_length <= 0 )			{				return( NULL );			}			/* One additional character required for end of string			 */			user_input = libewf_string_duplicate( user_input_buffer_ptr, input_length );			if( user_input == NULL )			{				LIBEWF_WARNING_PRINT( "ewfcommon_get_user_input_variable: unable to create string.\n" );				return( NULL );			}			break;		}		else		{			fprintf( stream, "Error reading input, please try again or terminate using Ctrl^C.\n" );		}	}	return( user_input );}/* Get variable input from the user * with a maximum of 1023 characters */CHAR_T *ewfcommon_get_user_input_variable_char_t( FILE *stream, LIBEWF_CHAR *request_string ){	LIBEWF_CHAR *user_input   = NULL;	CHAR_T *user_input_char_t = NULL;	size_t user_input_length  = 0;	user_input = ewfcommon_get_user_input_variable( stream, request_string );	if( sizeof( CHAR_T ) == sizeof( LIBEWF_CHAR ) )	{		return( (CHAR_T *) user_input );	}	if( sizeof( CHAR_T ) < sizeof( LIBEWF_CHAR ) )	{		user_input_length = libewf_string_length( user_input );		user_input_char_t = libewf_common_alloc( ( user_input_length + 1 ) * sizeof( CHAR_T ) );		if( user_input_char_t == NULL )		{			LIBEWF_WARNING_PRINT( "ewfcommon_get_user_input_variable_char_t: unable to create conversion string.\n" );			return( NULL );		}		if( ewcommon_copy_libewf_char_to_char_t( user_input, user_input_char_t, ( user_input_length + 1 ) ) != 1 )		{			LIBEWF_WARNING_PRINT( "ewfcommon_get_user_input_variable_char_t: unable to set conversion string.\n" );			return( NULL );		}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频观看一区| 欧美在线观看禁18| 欧美日韩三级一区二区| 精品美女被调教视频大全网站| 中文字幕中文乱码欧美一区二区| 午夜亚洲国产au精品一区二区| 国产精品一级黄| 欧美片网站yy| 一区二区三区精品| 成人激情黄色小说| 2021国产精品久久精品| 亚洲成人在线观看视频| 色综合网站在线| 国产精品污网站| 经典三级在线一区| 91精品久久久久久久99蜜桃| 亚洲欧美日韩小说| 99久久精品免费| 亚洲国产精品精华液2区45| 欧美aaa在线| 欧美电影一区二区三区| 亚洲一二三四区不卡| 99久久久久久| 亚洲欧洲另类国产综合| 成人av网站免费| 亚洲国产精品成人久久综合一区| 另类综合日韩欧美亚洲| 91精品国产91热久久久做人人| 夜夜揉揉日日人人青青一国产精品 | 欧美大片在线观看| 日本sm残虐另类| 欧美日本视频在线| 天天综合色天天综合| 欧美日韩在线电影| 婷婷夜色潮精品综合在线| 欧美色老头old∨ideo| 日韩福利视频网| aaa欧美大片| 国产精品传媒在线| 91天堂素人约啪| **性色生活片久久毛片| 成人18精品视频| 亚洲精选一二三| 欧美亚洲动漫精品| 日韩在线卡一卡二| 日韩欧美的一区| 国产精品综合网| 国产精品第一页第二页第三页| 91在线免费视频观看| 亚洲嫩草精品久久| 欧美日韩精品二区第二页| 免费高清在线视频一区·| 日韩精品自拍偷拍| 奇米亚洲午夜久久精品| 777午夜精品免费视频| 亚洲高清在线视频| 日韩一区二区在线观看视频 | 6080日韩午夜伦伦午夜伦| 免费成人在线网站| 久久精品亚洲乱码伦伦中文| 99久久伊人久久99| 午夜av区久久| 欧美激情一区二区三区全黄| 色菇凉天天综合网| 老司机免费视频一区二区| 亚洲国产高清在线观看视频| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产精品系列在线| 欧美日韩aaaaa| 国产成a人亚洲精品| 亚洲一区在线视频观看| 久久日一线二线三线suv| 99精品久久久久久| 久久精品99久久久| 一区二区三区四区在线免费观看| 日韩欧美精品三级| 在线一区二区三区四区五区| 韩国女主播成人在线观看| 伊人婷婷欧美激情| 久久品道一品道久久精品| 欧洲av在线精品| 国产99久久久国产精品潘金| 首页国产欧美久久| 亚洲欧美激情在线| 久久九九久久九九| 日韩一区二区三区四区| 色哟哟亚洲精品| 国产精品亚洲一区二区三区在线| 水野朝阳av一区二区三区| 亚洲欧洲无码一区二区三区| 26uuuu精品一区二区| 欧美日韩精品三区| 色就色 综合激情| 成人h动漫精品一区二区| 免费在线一区观看| 亚洲电影视频在线| 亚洲蜜臀av乱码久久精品蜜桃| 精品国产乱码91久久久久久网站| 欧美系列在线观看| 色综合久久久久综合| 成人精品免费视频| 国产盗摄女厕一区二区三区| 久热成人在线视频| 免费在线观看一区二区三区| 亚洲专区一二三| 一区二区成人在线| 一区二区三区日韩精品视频| 国产精品二三区| 中文字幕+乱码+中文字幕一区| 久久午夜免费电影| 精品国产乱码久久久久久牛牛| 欧美一二区视频| 日韩一区二区中文字幕| 日韩欧美在线123| 日韩亚洲欧美一区二区三区| 日韩一区二区三区视频在线| 日韩一区二区三区四区五区六区| 91精品婷婷国产综合久久竹菊| 欧美日韩久久不卡| 91精品国产综合久久精品性色| 69av一区二区三区| 日韩区在线观看| 久久久无码精品亚洲日韩按摩| 国产亚洲欧美日韩在线一区| 欧美国产欧美综合| 亚洲免费在线观看| 午夜精品视频一区| 日韩电影免费在线看| 日本视频一区二区三区| 精品一区二区三区久久| 国产精品亚洲视频| 99久久婷婷国产综合精品| 在线看不卡av| 日韩精品资源二区在线| 欧美激情一区二区| 亚洲黄色小说网站| 奇米影视7777精品一区二区| 国产精品99精品久久免费| www.亚洲免费av| 欧美美女喷水视频| 久久天天做天天爱综合色| 国产精品国产三级国产普通话三级| 国产精品国产成人国产三级| 亚洲国产日韩综合久久精品| 麻豆国产欧美日韩综合精品二区| 国产一区在线不卡| 色中色一区二区| 日韩欧美高清dvd碟片| 欧美国产综合一区二区| 一区二区三区在线播放| 久久精品国产99国产精品| 成人一级视频在线观看| 欧美制服丝袜第一页| 日韩精品一区二区三区三区免费 | 91精品国产综合久久精品app | 亚洲国产成人私人影院tom| 亚洲日本丝袜连裤袜办公室| 青娱乐精品视频在线| 成人av免费网站| 欧美一二区视频| 一区二区三区不卡视频| 国产一区二区三区在线观看免费视频| 北条麻妃一区二区三区| 欧美大白屁股肥臀xxxxxx| 综合激情网...| 国产在线精品国自产拍免费| 欧美在线不卡视频| 国产精品色呦呦| 激情综合色综合久久综合| 欧美性xxxxxx少妇| 国产精品免费免费| 久久99国产精品麻豆| 91久久精品一区二区三| 久久精品人人做人人综合 | 欧美精品精品一区| 亚洲三级在线播放| 狠狠色丁香婷婷综合久久片| 精品1区2区3区| 亚洲精品国产一区二区精华液 | 国产精品私人影院| 狠狠色丁香婷婷综合久久片| 制服丝袜亚洲网站| 亚洲成av人片| 在线免费视频一区二区| 国产精品久久久久久户外露出| 国产制服丝袜一区| 欧美大片在线观看一区二区| 日韩av一区二| 制服视频三区第一页精品| 亚洲一区视频在线| 在线看国产日韩| 一级女性全黄久久生活片免费| av一区二区三区四区| 国产精品女主播在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲人成在线播放网站岛国| 成人午夜电影久久影院| 中文字幕精品综合| 99久久99久久精品免费看蜜桃| 亚洲国产精华液网站w|