硬盘锁源程序,有兴趣的朋友看看,前提是已经看了<BR>http://www.heibai.net/article/show.php?id=2694,这是文章提到的HDBOOT.EXE的源程序。如果你觉得对你有用,可以到http://www.heibai.net/download/show.php?id=2792下载。 </P><P>硬盘锁安装程序 <BR>DATA SEGMENT <BR> D1 DB 0CDH,0BFH,0D1H,0E5H,0EAH,0CDH <BR> D2 DB 'You had not install the HDLOCK,do you install?(y/n)',0dh,0ah,'$' <BR> D3 DB 'HDLOCK.DAT',00H <BR> D4 DB 'Can not find file (HDLOCK.DAT)',0dh,0ah,'$' <BR> D5 DB 'PASSWORD',00H <BR> D6 DB 1EH,06H,0B9H,00H,01H,0BFH,00H,06H,0B8H,00H,00H,8EH,0D8H,8EH,0C0H,0BEH;逻辑锁 <BR> DB 00H,7CH,0F2H,0A5H,0EAH,1AH,06H,00H,00H,90H,0EBH,09H,50H,41H,53H,53H <BR> DB 57H,4FH,52H,44H,00H,0B8H,00H,06H,0B7H,0F0H,0B9H,00H,00H,0BAH,4FH,18H <BR> DB 0CDH,10H,0B2H,01AH,0BEH,1CH,06H,0B4H,02H,0B6H,10H,0B7H,00H,0CDH,10H,8AH <BR> DB 04H,3CH,00H,74H,1BH,0B4H,09H,0B9H,01H,00H,0B7H,00H,0B3H,70H,0CDH,10H <BR> DB 0FEH,0C2H,46H,0EBH,0E2H,0CDH,20H,4FH,3DH,33H,0CDH,20H,33H,33H,33H,33H <BR> DB 0B9H,04H,00H,0B8H,00H,00H,8EH,0C0H,0BFH,01H,08H,0F3H,0ABH,0B9H,09H,00H <BR> DB 0BFH,01H,08H,0B2H,23H,0B4H,00H,0CDH,16H,3CH,0DH,74H,79H,0B4H,02H,90H <BR> DB 90H,0B6H,10H,0B7H,00H,0CDH,10H,3CH,08H,74H,37H,50H,0B4H,0EH,0B0H,2AH <BR> DB 0B3H,07H,0CDH,10H,58H,04H,23H,88H,05H,47H,49H,83H,0F9H,00H,74H,0AH <BR> DB 0FEH,0C2H,0EBH,0D1H,24H,67H,00H,77H,69H,6EH,0B6H,10H,0B4H,02H,0B2H,23H <BR> DB 0B7H,00H,0CDH,10H,0B4H,09H,0B0H,00H,0B3H,07H,0B9H,09H,00H,0CDH,10H,0EBH <BR> DB 9FH,51H,51H,0B4H,03H,0B7H,00H,0CDH,10H,80H,0FAH,23H,74H,0A7H,81H,0FFH <BR> DB 00H,08H,74H,0A1H,0B4H,02H,0FEH,0CAH,0CDH,10H,0B4H,0EH,0B0H,00H,0B3H,07H <BR> DB 0CDH,10H,0B8H,00H,00H,89H,05H,4FH,89H,05H,59H,0EBH,88H,07H,43H,04H <BR> DB 0E8H,86H,0CDH,20H,44H,44H,0B8H,00H,00H,8EH,0C0H,8EH,0D8H,0BEH,0B0H,07H <BR> DB 0BFH,01H,08H,0B9H,04H,00H,0F3H,0A7H,74H,04H,0EBH,3CH,55H,55H,0B8H,00H <BR> DB 00H,8EH,0C0H,0B8H,01H,02H,0B9H,02H,00H,0BAH,80H,00H,0BBH,00H,0F0H,0CDH <BR> DB 13H,0B8H,01H,03H,0B9H,01H,00H,0BAH,80H,00H,0CDH,13H,0B8H,00H,00H,8EH <BR> DB 0C0H,0B8H,01H,02H,0B9H,03H,00H,0BAH,80H,00H,0BBH,00H,7CH,0CDH,13H,0EAH <BR> DB 00H,7CH,00H,00H,00H,00H,00H,00H,0B8H,00H,00H,8EH,0C0H,0B8H,01H,02H <BR> DB 0B9H,04H,00H,0BAH,80H,00H,0BBH,00H,0F0H,0CDH,13H,0B8H,01H,03H,0B9H,01H <BR> DB 00H,0BAH,80H,00H,0CDH,13H,0CDH,19H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 64H,64H,64H,64H,64H,64H,64H,64H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 01H,00H,05H,0FEH,7FH,05H,3FH,00H,00H,00H,47H,39H,40H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H <BR> DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,55H,0AAH <BR> D7 DB 'You have been installed HDLOCK,do you remove?(y/n)',0dh,'$' <BR> D8 DB 'PASSWORD ERROR$' <BR> D9 DB 0dh,0ah <BR> DB 0dh,0ah <BR> DB ' # # # # # # # # # # # # #',0dh,0ah <BR> DB ' # # # # # # # # # # # # #',0dh,0ah <BR> DB ' # # # # # # # # # # # # #',0dh,0ah <BR> DB ' # # # # # # # # # # # # #',0dh,0ah <BR> DB ' # # # # # # # # # # # # # #',0dh,0ah <BR> DB 0dh,0ah <BR> DB ' ----------# HARD DISK LOCK #------------',0dh,0ah <BR> DB ' BY:THE MAN LIKE WIND',0dh,0ah <BR> DB ' E-mail:tyhhyf@hotmail.com',0dh,0ah <BR> DB ' OICQ:86633320',0dh,0ah <BR> D10 DB 'Enter anykey to enter the PASSWORD.$' <BR> D11 DB 'Enter anykey to enter the PASSWORD again.$' <BR> D12 DB 'Error:Two PASSWORD is not alike!$' <BR> D13 DB 'The HDLOCK had been installed,please remember you PASSWORD!!!$' <BR> D14 DB 'The HDLOCK had been removed.$' <BR>DATA ENDS <BR>CODE SEGMENT <BR> ASSUME CS:CODE,DSATA,ESATA <BR>START: <BR> MOV AX,DATA <BR> MOV DS,AX <BR> MOV ES,AX <BR> MOV DX,OFFSET D9 <BR> MOV AH,09H <BR> INT 21H <BR> MOV AH,00H <BR> INT 16H <BR>;判断是否安装过硬盘锁程序 <BR>NEXT: <BR> MOV AX,0201H;读一扇区 <BR> MOV CX,0001H <BR> MOV DX,0080H <BR> MOV BX,0F000H <BR> INT 13H <BR> MOV AX,0201H <BR> MOV CX,0001H <BR> MOV DX,0080H <BR> MOV BX,0E000H <BR> INT 13H <BR> MOV SI,0F1A0H <BR> MOV DI,OFFSET D1 <BR> MOV CX,0003H <BR> REPE CMPSW <BR> JNZ INSTALL <BR> JMP DEL <BR>INSTALL: <BR> MOV DX,OFFSET D2 <BR> MOV AH,09H <BR> INT 21H <BR>ENTER: <BR> INT 16H <BR> OR AL,20H <BR> CMP AL,'y';是Y? <BR> JE INSTALL1 <BR> CMP AL,'n' <BR> JE EXIT <BR> JMP ENTER <BR>EXIT: <BR> MOV AH,4CH <BR> INT 21H <BR>INSTALL1: <BR> MOV AH,3DH <BR> MOV DX,OFFSET D3 <BR> MOV AL,00H <BR> INT 21H <BR> JB AERROR <BR> PUSH AX <BR> MOV AH,3FH <BR> MOV DX,0F000H <BR> MOV CX,01BEH <BR> POP BX <BR> INT 21H <BR> MOV AH,09H <BR> MOV DX,OFFSET D10 <BR> INT 21H <BR> MOV AH,00H <BR> INT 16H <BR> CALL NEAR PTR PWENTER <BR> MOV SI,0F1B0H <BR> MOV DI,0F3B0H <BR> MOV CX,0004H <BR> REPNZ MOVSW <BR> MOV AH,06H <BR> MOV AL,00H <BR> MOV BH,07H <BR> MOV CX,0000H <BR> MOV DX,184FH <BR> INT 10H <BR> MOV DH,03H <BR> MOV DL,00H <BR> MOV BH,00H <BR> MOV AH,02H <BR> INT 10H <BR> MOV AH,09H <BR> MOV DX,OFFSET D11 <BR> INT 21H <BR> MOV AH,00H <BR> INT 16H <BR> CALL NEAR PTR PWENTER <BR> MOV SI,0F1B0H <BR> MOV DI,0F3B0H <BR> MOV CX,0008H <BR> REPE CMPSB <BR> JNZ EXIT4 <BR> JMP WRITE <BR>AERROR: <BR> MOV AH,09H <BR> MOV DX,OFFSET D4 <BR> INT 21H <BR> JMP EXIT <BR>EXIT4: <BR> MOV DH,03H <BR> MOV DL,00H <BR> MOV BH,00H <BR> MOV AH,02H <BR> INT 10H <BR> MOV AH,06H <BR> MOV AL,00H <BR> MOV BH,07H <BR> MOV CX,0000H <BR> MOV DX,184FH <BR> INT 10H <BR> MOV AH,09H <BR> MOV DX,OFFSET D12 <BR> INT 21H <BR> MOV AH,4CH <BR> INT 21H <BR>WRITE: <BR> MOV AX,0301H <BR> MOV CX,0003H <BR> MOV DX,0080H <BR> MOV BX,0E000H <BR> INT 13H <BR> MOV BX,OFFSET D6 <BR> ADD BX,1B0H <BR> MOV CX,4H <BR> MOV SI,0F1B0H <BR> MOV DI,BX <BR> REPNZ MOVSW <BR> MOV AX,0301H <BR> MOV CX,0004H <BR> MOV DX,0080H <BR> MOV BX,OFFSET D6 <BR> INT 13H <BR> MOV AX,0301H <BR> MOV CX,0002H <BR> MOV BX,0F000H <BR> MOV DX,0080H <BR> INT 13H <BR> MOV AX,0301H <BR> MOV CX,0001H <BR> MOV BX,0F000H <BR> MOV DX,0080H <BR> INT 13H <BR> MOV AH,06H <BR> MOV AL,00H <BR> MOV BH,07H <BR> MOV CX,0000H <BR> MOV DX,184FH <BR> INT 10H <BR> MOV DH,03H <BR> MOV DL,00H <BR> MOV BH,00H <BR> MOV AH,02H <BR> INT 10H <BR> MOV AH,09H <BR> MOV DX,OFFSET D13 <BR> INT 21H <BR> JMP EXIT </P><P>DEL: <BR> MOV DX,OFFSET D7 <BR> MOV AH,09H <BR> INT 21H <BR>ENTER2: <BR> MOV AH,00H <BR> INT 16H <BR> OR AL,20H <BR> CMP AL,'y' <BR> JE UNLADE <BR> CMP AL,'n' <BR> JE EXIT1 <BR> JMP ENTER2 <BR>EXIT1: <BR> MOV AH,4CH <BR> INT 21H <BR>UNLADE: <BR> CALL NEAR PTR PWENTER <BR> MOV SI,0F1B0H <BR> MOV DI,0E1B0H <BR> MOV CX,8H <BR> REPE CMPSB <BR> JNZ EXIT2 <BR> MOV AX,0201H <BR> MOV CX,0003H <BR> MOV BX,0F000H <BR> MOV DX,0080H <BR> INT 13H <BR> MOV AX,0301H <BR> MOV CX,0001H <BR> MOV BX,0F000H <BR> MOV DX,0080H <BR> INT 13H <BR> MOV DH,03H <BR> MOV DL,00H <BR> MOV BH,00H <BR> MOV AH,02H <BR> INT 10H <BR> MOV AH,06H <BR> MOV AL,00H <BR> MOV BH,07H <BR> MOV CX,0000H <BR> MOV DX,184FH <BR> INT 10H <BR> MOV AH,09H <BR> MOV DX,OFFSET D14 <BR> INT 21H <BR> JMP EXIT <BR>EXIT2: <BR> MOV AH,09H <BR> MOV DX,OFFSET D8 <BR> INT 21H <BR> MOV AH,4CH <BR> INT 21H <BR>;子程序用于从键盘读密码 <BR>PWENTER PROC NEAR <BR> PUSH AX <BR> PUSH BX <BR> PUSH CX <BR> PUSH DX <BR> MOV AX,0600H <BR> MOV BH,0F0H <BR> MOV CX,0000H <BR> MOV DX,184FH <BR> INT 10H <BR> MOV DL,1AH <BR> MOV SI,OFFSET D5 <BR>DISPLAY: <BR> MOV AH,02H <BR> MOV DH,10H <BR> MOV BH,00H <BR> INT 10H <BR> MOV AL,[SI] <BR> CMP AL,00H <BR> JE GETPW <BR> MOV AH,09H <BR> MOV CX,01H <BR> MOV BH,00H <BR> MOV BL,70H <BR> INT 10H <BR> INC DL <BR> INC SI <BR> JMP DISPLAY <BR>GETPW: <BR> MOV CX,0004H <BR> MOV AH,0000H <BR> MOV DI,0F1B0H <BR> REPZ STOSW <BR> MOV CX,0009H <BR> MOV DI,0F1B0H <BR> MOV DL,23H <BR>READKEY: <BR> MOV AH,00H <BR> INT 16H <BR> CMP AL,0DH <BR> JE OK <BR> CMP AL,20H <BR> JE READKEY <BR> CMP AL,00H <BR> JE READKEY <BR> CMP AL,09H <BR> JE READKEY <BR> CMP AL,1BH <BR> JE AESC <BR> PUSH CX <BR> MOV AH,02H <BR> MOV DH,10H <BR> MOV BH,00H <BR> INT 10H <BR> POP CX <BR> CMP AL,08H <BR> JE BACKSPACE <BR> PUSH AX <BR> MOV AH,0EH <BR> MOV AL,2AH <BR> MOV BL,07H <BR> INT 10H <BR> POP AX <BR> ADD AL,23H <BR> MOV [DI],AL <BR> INC DI <BR> DEC CX <BR> CMP CX,00H <BR> JE OVERFLOW <BR> INC DL <BR> JMP READKEY <BR>OK: <BR> POP AX <BR> POP BX <BR> POP CX <BR> POP DX <BR> RET <BR>AESC: <BR> MOV AH,4CH <BR> INT 21H <BR>OVERFLOW: <BR> MOV DH,10H <BR> MOV AH,02H <BR> MOV DL,23H <BR> MOV BH,00H <BR> INT 10H <BR> MOV AH,09H <BR> MOV AL,00H <BR> MOV BL,07H <BR> MOV CX,0009H <BR> INT 10H <BR> JMP GETPW <BR>BACKSPACE: <BR> PUSH CX <BR> MOV AH,03H <BR> MOV BH,00H <BR> INT 10H <BR> POP CX <BR> CMP DL,23H <BR> JE READKEY <BR> CMP DI,0F1AFH; <BR> JE READKEY <BR> PUSH CX <BR> MOV AH,02H <BR> DEC DL <BR> INT 10H <BR> POP CX <BR> PUSH CX <BR> MOV AH,0EH <BR> MOV AL,00H <BR> MOV BL,07H <BR> INT 10H <BR> POP CX <BR> MOV AX,0000H <BR> MOV [DI],AX <BR> DEC DI <BR> MOV [DI],AX <BR> CMP CX,09H <BR> JE AJUMP <BR> INC CX <BR> JMP AJUMP <BR>AJUMP: <BR> JMP READKEY <BR>PWENTER ENDP <BR>CODE ENDS <BR> END START <BR> |