1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71:
| rocedure TForm1.load(Sender: TObject); begin stringgrid1.cells[1,0]:='HTTP'; stringgrid1.cells[2,0]:='SMTP'; stringgrid1.Cells[3,0]:='FTP'; stringgrid1.cells[4,0]:='POP3'; stringgrid1.cells[5,0]:='HTTPS';
i:=1; try stringgrid1.Cells[0,i]:=ini.ReadString('t-online','Name','Name'); finally ini.free; end;
end;
procedure TForm1.Button1Click(Sender: TObject); var ports : array [1..5] of String; Sock : TTCPClient; begin Ports[1] := '80'; Ports[2] := '119'; Ports[3] := '21'; Ports[4] := '110'; Ports[5] := '443'; Sock := TTCPClient.Create(self); Sock.RemoteHost := edit1.text;
if l = 0 then l := 1;
i:=1; memo1.Lines.add(Sock.LookupHostAddr(Sock.RemoteHost) + ' Connecting...'); memo1.Lines.add('>'); repeat Sock.RemotePort := Ports[i]; Sock.OnConnect := ActiveConnection; Sock.OnError := SocketError ; Sock.Active := True; Application.ProcessMessages; Sock.Active := False; i := i + 1; until i = 6; Sock.Free; l:=l+1; memo1.Lines.add('Done.'); memo1.Lines.add('-------------------------------'); end;
procedure TForm2.Button2Click(Sender: TObject); var ini: TIniFile; begin ini:=TIniFile.create(ExtractFilePath(ParamStr(0))+ 'einstellungen.ini');
ini.writestring(name1.text,'Name',name1.text); ini.WriteString(name1.text,'URL',URL.text); ini.WriteString(name1.text,'BEM',BEM.text);
if CH_HTTP.Checked then ini.Writestring(name1.text,'HTTP','80'); if CH_SMTP.Checked then ini.writestring(name1.text,'SMTP','25'); if CH_FTP.Checked then ini.writestring(name1.text,'FTP','21'); if CH_HTTPS.Checked then ini.writestring(name1.Text,'HTTPS','443'); if CH_POP3.Checked then ini.writestring(name1.text,'POP3','110');
ini.free; form2.hide; end; |