Ich frag mich grad echt was ich falsch mach...
Hab mal angefangen nach vielen anderen Progs mal was mit Sockets zu schreiben...
Ich will nen bestimmten Port Scanner entwickeln und dafür will ich halt mal nen laufenden ErstCode hinbekommen...
hier hab ich ma was geschrieben:
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:
| program ru_scan;
{$APPTYPE CONSOLE}
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ScktComp;
var port_to_scan: integer; maxport: integer; WSsocket: TClientSocket; IsRunning: Boolean; ip: string;
Procedure WSsocketError(Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent); Begin writeln('Port: ' + inttostr(Port_to_scan) + ' - Closed.');
wsSocket.Active := False; End;
Procedure WSsocketConnect(Sender: TObject; Socket: TCustomWinSocket); Begin writeln('PORT: ' + inttostr(port_to_scan) + '; OPEN!');
wsSocket.Active := False; End;
begin ip := '217.110.104.156'; port_to_scan := 80; wsSocket.Address := ip; wsSocket.Port := port_to_scan; wsSocket.Active := True;
read; end. |
Nur leider kommt da immer nen wahrloser Error und ich kann den FEhler nicht finden...
Compilieren geht ja ohne probs... kann mir jemand bitte helfen?
Wär echt toll, danke, Marco