⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcunlock.c

📁 加密解密,安全工具!很有意思的代码
💻 C
字号:
/*********************************************************************      Copyright (c) 1994-1999 Jetico, Inc., Finland*      All rights reserved.**      File: bcunlock.c*      Revision: $Id: bcunlock.c,v 1.6 2002/10/29 07:11:31 crypt Rel-1.6-3 $*      Created:*      Description: implementation of container info routine********************************************************************/#include <stdio.h>#include <stdlib.h>#include <fcntl.h>#include <unistd.h>#include <string.h>#include <errno.h>#include "header.h"#include "config.h"#include "bctool.h"#include "misc.h"#include "error.h"char bcunlock_c[]="$Id: bcunlock.c,v 1.6 2002/10/29 07:11:31 crypt Rel-1.6-3 $";int bcunlock (int argc, char ** argv){    struct HiddenSector  hs;    int fd;    if ( argc < 2 )    {        msg(stderr,"Please specify container name\n");         return -1;     }    else if ( argc > 2 )    {        msg(stderr,"Too many parameters\n");        return -1;    }    if ( (fd = open(argv[1], O_RDONLY|O_LARGEFILE)) < 0 )    {        msg(stderr,"open(\"%s\",O_RDWR): %s\n",argv[1],strerror(errno));        return -1;     }    if ( read(fd, &hs, sizeof(hs))!=sizeof(hs) )    {        msg(stderr,"Can not read container header\n");        close(fd);        return -1;     }    if ( strncmp(hs.br.OEMid, "LOCOS94 ", sizeof(hs.br.OEMid))!=0 )    {        msg(stderr,"%s is not valid BestCrypt container\n",argv[0]);        close(fd);        return -1;    }    if (-1 == unlock_container(argv[1]))    {        msg(stderr,"unlock_container(\"%s\"): %s\n",argv[1],strerror(errno));    }    close(fd);    return 0;} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -