快讯

在BMP文件中隐藏信息

2004-02-14 09:34  出处:PConline  作者:网上收集  责任编辑:zwg 

作者: John Collomosse 关键字: BMP 加密 原作者姓名: John Collomosse 文章原始出处: http://www.blindside.co.uk/ 介绍 Blindside is a steganography application that hides information inside .BMP (bitmap) images. It is a command-line utility, for which source code and precompiled Unix binaries are available. The Blindside homepage is located at: http://www.blindside.co.uk/ 正文 #include < stdio.h > #include < stdlib.h > #include < string.h > /************************************\ * B L I N D S I D E * * * * Image stego/crypto tool, please * * see http://www.blindside.co.uk * * * * Compile with GCC or equiv ANSI C * * * * John Collomosse (mapjpc@bath.ac.uk)* * Freeware/public domain * * * \************************************/ #define HEAP_UNITSIZE (102400) #define HEAP_INITUNITS (1) #define LOOKUP_INITLEN (2048) #define FALSE (0) #define TRUE (-1) #define PATH_SEP ('\\') /* OS Specific Path Seperator */ #define BANNER ("BlindSide BMP Cryptographic Tool - (c) John Collomosse 2000\nRelease v0.9. All Rights Reserved, contact: ma7jpc@bath.ac.uk\n\n") #define THIS_PROTO_VER (1) /* Heap Structure (memory storage class for uchars) */ typedef struct heapstruct { unsigned int heapunits; /* Heap size to nearest 'unit' */ unsigned char *dataspace; /* Dataspace where data stored */ unsigned char *nextchar; /* Pointer to end of dataspace */ unsigned long heaplen; /* Length of data in heap */ } HEAP; typedef struct lookupstruct { unsigned long int* dataspace; unsigned long int currentlen; unsigned long int curitem; } LOOKUP; /* Bitmap Structure */ typedef struct bmpstruct { char* signature; long filesize; long x_size; long y_size; int bitplanes; int bpp; long compression; long compresssize; long x_pix_per_metre; long y_pix_per_metre; long colours; long cols_important; HEAP* palette; HEAP* raster; } BITMAP; typedef struct pixstruct { unsigned char red; unsigned char green; unsigned char blue; } PIXEL; /* Function prototypes */ int initialiseHeap (HEAP*); int expandHeap (int, HEAP*); void removeHeap (HEAP*); int putToHeap (unsigned char,HEAP*); int streamFileToHeap (FILE*, HEAP*); int readBitmapFile (FILE*, BITMAP*); void promoteTo24 (BITMAP*, BITMAP*); unsigned long resolveMaxEncode (BITMAP*, LOOKUP*); void writeBitmapFile (FILE*, BITMAP*); unsigned int biggest_of_3 (unsigned int,unsigned int,unsigned int); void longToStream (FILE*,unsigned long int); unsigned long streamToLong (FILE*); void process24gotpixel (unsigned char, unsigned char*,HEAP*); unsigned int calcEOLpad (int, long); PIXEL getIndexedPixel (unsigned long int, BITMAP*); void encodeData (BITMAP*, HEAP*, LOOKUP*); void setIndexedPixel (unsigned long int, BITMAP*, PIXEL); unsigned char getNextHeapBit (unsigned long int, int, HEAP*); int decodeData (BITMAP*, HEAP*); void cryptoData (HEAP* data, unsigned char* key); unsigned char xor (unsigned char, unsigned char); int rotl4 (int); int hash_func (unsigned char*); int pow (int,int); int stricmp (const char*, const char*); int formatDataspace (BITMAP*, HEAP*); void dumpFileDirectory (HEAP*); void dumpFileStats (BITMAP*, HEAP*); void addFileToArchive (HEAP*, FILE*, char*); int checkExists (char*); int extractFile (HEAP*, char*); void flattenBitmap (BITMAP*, LOOKUP*);
键盘也能翻页,试试“← →”键
IT热词搜索 来源:360新闻
相关文章

相关软件:

腾讯QQ2012
大小:52.93 MB 授权:免费
腾讯QQ2012
立即下载
腾讯QQ2013
大小:49.32 MB 授权:免费
腾讯QQ2013
立即下载