Reboot Source Code |
About Karen JP - PGP Keys - Vossen's Law - Firefox - MythTV Photos - Deck - SCUBA - Dolphins Security - Firewall Rules - Flypaper - GNATBox - Home - Home Net Security - Principles - Snort - Snort Books - Sec Tools - GenPass - Honeypot Stats - Firewall Stats Source - Perl Networking - Time - NAT - IP Calcs Linux - apt - Edutainment - SME Server - Backup (DI-30) Windows - Win Tools - Voodoo - Win. Shell Scripting - POSIX Redirection - Winlogcheck What's New Email me Email Form |
Source Code for programs that reboot your PC. Reboot.c#define MAGIC 0 /* for cold restart */ /* #define MAGIC 0x1234 /* for warm restart */ #define BOOT_SEG 0xffffL #define BOOT_OFF 0x0000L #define BOOT_ADR ((BOOT_SEG << 16) | BOOT_OFF) #define DOS_SEG 0x0040L #define RESET_FLAG 0x0072L #define RESET_ADR ((DOS_SEG << 16) | RESET_FLAG) main() { void ((far *fp)()) = (void (far *)()) BOOT_ADR; *(int far *)RESET_ADR = MAGIC; (*fp)(); return 0; /* never gets here, but keeps compiler happy */ } Reboot.basREM From PC Mag, Vol11 Number 5 DECLARE SUB ReBoot (Warm%) CALL ReBoot(1) 'be sure to save this program before running it! SUB ReBoot (Warm%) STATIC IF Warm% THEN 'if they want a warm boot DEF SEG = 0 'assign the value 1234 Hex POKE &H473, &H12 'to address 0000:0473 Hex POKE &H472, &H34 END IF DEF SEG = &HFFFF 'either way call the BIOS CALL Absolute(0) 'routine at FFFF:0000 Hex END SUB To use these "scripts" cut&paste the source into a file, then issue the following command "debug < cldboot.scr". CLDBoot.scrA 0100 MOV AX,40 MOV DS,AX JMP FFFF:0000 N CLDBOOT.COM RCX 10 W Q WRMBoot.scrA 0100 MOV AX,40 MOV DS,AX MOV WORD PTR [72],1234 JMP FFFF:0000 N REBOOT.COM RCX 10 W Q |
http://www.jpsdomain.org/public/source/rebt-src.html Copyright © 1995-2022, JP Vossen. All rights reserved. Last Modified: $Date: 2007-11-28 02:26:46 -0500 (Wed, 28 Nov 2007) $ |