home *** CD-ROM | disk | FTP | other *** search
- program Terminal_WhoIs;
- var evnt,i,x:integer;
- s,s1,s2,s3,ts:string;
- v1,v2:integer;
- begin
- enableharddisconnect(0);
- setstatus('Connected to WhoIs server '+nv_remoteip);
- textbackground($000000);
- textfont(0);setoemcp(0);
- setbackcolor($000000);
- textbackground($FFFFFF);
- writeln(' ');
- textbackground($000000);
- textcolor($00FFFF);
- writeln('>Type in any text field below address, about which you wish to see information');
- writeln('>If specified server doesn''t has information try another server');
- s:='';
- repeat
- evnt:=waitevent(v1,v2);
- if (evnt=1) or (evnt=0) then
- begin
- repeat
- try
- s:=s+recv;
- except
- s:=s+#13;
- evnt:=0;
- end;
- x:=pos(#13,s);
- if x=0 then x:=pos(#10,s);
- if x=0 then x:=pos('%',s);
- if x<>0 then
- begin
- ts:=copy(s,1,x-1);
- if length(ts)>1 then
- begin
- if (ts[1]='[') and (ts[length(ts)]=']') then textcolor($FFFF00) else
- if ((ts[1]=';') and (ts[2]=';'))or (ts[1]='%') then textcolor($FF00FF) else
- if (ts[1]=';') then textcolor($FF00AA) else
- if (pos('inetnum:',ts)=1) or (pos('org:',ts)=1) or (pos('netname:',ts)=1) or
- (pos('descr:',ts)=1) or (pos('country:',ts)=1) or (pos('organisation:',ts)=1) or
- (pos('org-name:',ts)=1) or (pos('org-type:',ts)=1) or (pos('address:',ts)=1) or
- (pos('phone:',ts)=1)or(pos('e-mail:',ts)=1)or(pos('fax-no:',ts)=1)or
- (pos('person:',ts)=1)or(pos('route:',ts)=1)or(pos('holes:',ts)=1)or
- (pos('origin:',ts)=1)then textcolor($CCFFCC) else
- textcolor($00FF00);
- end else textcolor($00FF00)
- writeln(ts);
- delete(s,1,x);
- end;
- until x=0;
- end;
- if evnt=5 then
- begin
- s:=chr(v2);
- {if(v2=13)then s:=s+#10;}
- send(s);
- end;
-
- if evnt=6 then
- begin
- s1:='';s2:='';
- i:=getinputtext(s1,s2);
-
- if(v2<>0)then begin s3:=s1+s2; setinputtext(2,'');end
- else begin s3:=s1; setinputtext(1,'');end;
- textcolor($FFFF00);
- writeln('>'+s3);
- if(i and 1)<>0 then s3:=s3+#13#10;
- send(s3);
- end;
-
- until evnt=0;
- end.
-