Schreiben Programm zu Unhide das Fach
Das Programm zum unhide, welches das versteckte Fach gerade gegenüber dem Programm bearbeitet, das das Programm versteckt. In diesem Programm subtrahieren wir 16 (0x10) vom Wert des Dateisystem-Indikatorbytes des versteckten Faches.
Die Kodierung des Programms innen, wie folgt:
/* Zum unhide das Fach programmieren, das durch das vorhergehende Programm versteckt wird */
#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);
/* Den Gebrauch erhalten, zum unhide das Fach einzugeben */
gotoxy(1,15);printf("Enter The partition no., Which to
unhide, Or Press any other key to
Exit... ");
tohide=getche();
switch(tohide)
{
/* Unhide erstes Fach der Fachtabelle */
case '1':
dbuf[450] = dbuf[450] -16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* Unhide second partition of partition table */
case '2':
dbuf[466] = dbuf[466]-16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* Unhide third partition of partition table */
case '3':
dbuf[482] = dbuf[482] -16;
result = _bios_disk(_DISK_WRITE, &dinfo);
break;
/* Unhide fourth partition of partition table */
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;
}
Anmerkungen zum Programm
Achtgeben beim Geben der Fachzahl zum unhide. Wenn die Zahl des Faches falsch durch Fehler eingetragen wird, werden die Dateisysteminformationen dieses Faches geändert und Fach kann unzugänglich werden. Gleichwohl das Programm, das vorher besprochen wird, um die Fächer zu verstecken, dir helfen kann, das Dateisystem-Indikatorbyte von diesem Fach zu kurieren.
|
page 1 | 2 | 3 | 4 | 5 | 6 |
|
|
|