home *** CD-ROM | disk | FTP | other *** search
- program logged;
- (*
- This program works with most current versions of novell netware
- software. It is designed to log a user on to the NETWORK using
- msdos interrupts.
- Written by: Kip McClanahan
- 9501 Bart Hollow Dr.
- Austin Tx, 78750
- Feel free to ask any questions about the program.
-
- *)
-
-
- type result = record case integer of
- 1:(ax,bx,cx,dx,bp,si,di,ds,es,flags:integer);
- 2:(al,ah,bl,bh,cl,ch,dl,dh:byte);
- end;
-
- var regs:result;
- req:array [0..255] of byte; {request packet}
- rep:array [0..255] of byte; {reply packet}
- n,x,r,y,y1:integer;
- name,pw:string [30];
- ch:char;
-
- begin
- clrscr;
- for r:=1 to 30 do name[r]:=' ';
- write ('Enter user name:');
- readln (name);
- write ('enter pw:');
- read (kbd,pw);
- writeln;
- y:=length(name);
- y1:=length(pw);
-
- for r:=0 to 255 do rep[r]:=$00;
- for r:=0 to 255 do req[r]:=$00;
- regs.ds:=seg(req); {req. buffer`s segment addr}
- regs.si:=ofs(req); {offset addr.}
-
- regs.es:=seg(rep); {same as above for reply buffer}
- regs.di:=ofs(rep);
-
- req[1]:=$00; {high byte for length word}
- req[2]:=0; {command number}
- req[3]:=y; {name length}
- x:=3;
- for r:=1 to y do begin
- x:=x+1; {put name into buffer}
- n:=ord(copy(name,r,1));
- req[x]:=n;
- end;
- x:=x+1;
- req[x]:=y1;
- for r:=1 to y1 do begin
- x:=x+1; {...now the password}
- n:=ord(copy(pw,r,1));
- req[x]:=n;
- end;
- req[0]:=x; {packet length} {low byte for length word in buffer}
-
- rep[0]:=$ff; {reply buffer length}
- rep[1]:=$00;
-
- regs.ah:=$e3; {netware function call}
- MSDOS(regs);
- IF REGS.AL <>0 THEN WRITELN ('ERROR - UNSUCCESSFUL LOGIN')
- else begin
- writeln ('Welcome to THE Network, ',name);
- writeln ('Remember, you`re still in the login directory.');
- end;
- end.
-
-
-
-
-
-
-
-
-
-
-