📄 extract.c
字号:
// Hero Tech. Copyright 2007 by AlexMozh
/* Extract file sre.bmp */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <process.h>
#include <dos.h>
#include <bios.h>
#include <io.h>
int main()
{
FILE *fp,*fromfp,*tofp;
int i,j,k,l;
long unitlen=2048;
long baseadd=0x1000;
char ch;
char sh[21];
char pw[21]={"AronAlex2006"};
char pw1[21]={"HeroTech"};
char mysh[21]={""};
char filename[128]={"kov.zip"};
char toname[128]={"sre.bmp"};
char buf[2048];
unsigned attrib;
unsigned id;
unsigned cw[257];
unsigned long m=0;
long len,adds;
unsigned char hdno=0x80;
char secbuf[512];
// ========== Open the file <filename> ==========
if ((fp=fopen(filename,"rb"))==NULL)
{
return 1 ;
}
// ========= Restort sre.bmp from file <filename> to d:\ ===========
if ((tofp=fopen(toname,"wb"))==NULL)
{
return 1 ;
}
fseek(fp,baseadd,SEEK_SET);
fread(&adds,4,1,fp);
fread(&len,4,1,fp);
j=len / unitlen;
k=len % unitlen;
fseek(fp,adds,SEEK_SET);
for (i=0;i<j;i++)
{
fread(buf,unitlen,1,fp);
fwrite(buf,unitlen,1,tofp);
fseek(fp,1,SEEK_CUR);
}
if (k>0)
{
fread(buf,k,1,fp);
fwrite(buf,k,1,tofp);
}
fclose(fp);
fclose(tofp);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -