Ładny brzuch
Wiatm. Czy moe wiecie, jak zobi program, ktry rozpoznaje IP komputera, na ktrym pracujesx:roll:
Na kopty - Ascii Grafika :)
Ju to byo dziesitki razy, ale co tam....
Kod rdowy bdzie wyglda tak:
function TForm1.LocalIP : string; type TaPInAddr = array [0..10] of PInAddr; PaPInAddr = ^TaPInAddr; var phe : PHostEnt; pptr : PaPInAddr; Buffer : array [0..63] of char; I : Integer; GInitData : TWSADATA; begin WSAStartup($101, GInitData); Result := ''; GetHostName(Buffer, SizeOf(Buffer)); phe :=GetHostByName(buffer); if phe = nil then Exit; pptr := PaPInAddr(Phe^.h_addr_list); I := 0; while pptr^[I] <> nil do begin result:=StrPas(inet_ntoa(pptr^[I]^)); Inc(I); end; WSACleanup; end;
Pozdro for All
gg:4826295 | neohacker@interia.pl
zanotowane.pl doc.pisz.pl pdf.pisz.pl zsf.htw.pl
Na kopty - Ascii Grafika :)
Ju to byo dziesitki razy, ale co tam....
Kod rdowy bdzie wyglda tak:
function TForm1.LocalIP : string; type TaPInAddr = array [0..10] of PInAddr; PaPInAddr = ^TaPInAddr; var phe : PHostEnt; pptr : PaPInAddr; Buffer : array [0..63] of char; I : Integer; GInitData : TWSADATA; begin WSAStartup($101, GInitData); Result := ''; GetHostName(Buffer, SizeOf(Buffer)); phe :=GetHostByName(buffer); if phe = nil then Exit; pptr := PaPInAddr(Phe^.h_addr_list); I := 0; while pptr^[I] <> nil do begin result:=StrPas(inet_ntoa(pptr^[I]^)); Inc(I); end; WSACleanup; end;
Pozdro for All
gg:4826295 | neohacker@interia.pl