unhide에 숨겨지은 분할을 프로그램하십시오
숨겨지은 분할이 프로그램을 숨기는 프로그램의 반대 편에 다만 작동하는 unhide에 프로그램. 이 프로그램에서 우리는 숨겨지은 분할의 파일 시스템 지시자 바이트의 가치에서 16를 (0x10) 감한다.
다음과 같이 안으로 프로그램의 코딩:
/* unhide에 이전 프로그램에 의해 숨겨지은 분할을 프로그램하십시오 */
#include <bios.h>
#include <stdio.h>
int main(void)
{
struct diskinfo_t dinfo;
int result, tohide;
int i;
static char dbuf[512];/* Data buffer */
clrscr();
dinfo.drive = 0x80; /* drive number for
First Hard Disk */
dinfo.head = 0; /* disk head number */
dinfo.track = 0; /* track number */
dinfo.sector = 1; /* sector number */
dinfo.nsectors = 1; /* sector count */
dinfo.buffer = dbuf; /* data buffer */
result = _bios_disk(_DISK_READ, &dinfo);
if ((result & 0xff00) == 0)
{
printf("The Partition Codes of Four Partition
Entries are, 0x%02x, 0x%02x, 0x%02x And 0x%02x.\n",
dbuf[450] & 0xff, dbuf[466] & 0xff,
dbuf[482] & 0xff, dbuf[498] & 0xff);
textcolor(15);
gotoxy(5,5);
cprintf("Partition Entry in MBR is as follows:");
gotoxy(10,7);cprintf("1. "); showtype(dbuf[450] & 0xff);
gotoxy(10,8);cprintf("2. "); showtype(dbuf[466] & 0xff);
gotoxy(10,9);cprintf("3. "); showtype(dbuf[482] & 0xff);
gotoxy(10,10);cprintf("4. "); showtype(dbuf[498] & 0xff);
/* unhide에 분할을 입력하기 위하여 사용을 얻으십시오 */
gotoxy(1,15);printf("Enter The partition no., Which to
unhide, Or Press any other key to
Exit... ");
tohide=getche();
switch(tohide)
{
/* 분할 테이블의 Unhide 첫번째 분할 */
case '1':
dbuf[450] = dbuf[450] -16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* 분할 테이블의 Unhide 두번째 분할 */
case '2':
dbuf[466] = dbuf[466]-16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* 분할 테이블의 Unhide 제 3 의 분할 */
case '3':
dbuf[482] = dbuf[482] -16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* 분할 테이블의 Unhide 제 4 분할 */
case '4':
dbuf[498] = dbuf[498]-16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
default:
exit(0);
}
if ((result & 0xff00) == 0)
{
printf("\n\nThe New Partition Codes of Four Partition
Entries are, 0x%02x, 0x%02x, 0x%02x And 0x%02x.\n",
dbuf[450] & 0xff, dbuf[466] & 0xff,
dbuf[482] & 0xff, dbuf[498] & 0xff);
getch();
}
else
{
printf("Cannot Change the Byte, status = 0x%02x\n",
result);
getch();
}
}
return 0;
}
프로그램에 대하여 코멘트
분할 수를 unhide에 주고 있는 동안 조심하십시오. 분할의 수가 실수로 틀리게 들어가는 경우에, 저 분할의 파일 시스템 정보는 바뀌고 분할은 접근하기 어렵게 될지도 모른다. 분할을 숨기기 위하여 이전에 토론된 프로그램이, 당신이 저 분할의 파일 시스템 지시자 바이트를 치료할 것을 도울지도 모른다 그러나.
|
page 1 | 2 | 3 | 4 | 5 | 6 |
|
|
|