Thursday, August 5, 2010

Make a IPhunter


Some people say that programmers have become assembly workers, actually makes sense to use the control module + a small amount of code can be achieved, delphi 5.0 provides a wealth of internet control, using tcp / ip client - server can resolve the problem. The key control is serversocket, we imitate iphunter interface with a button1 (button), a combobox1 (for display), the three most basic controls placed on the blank form you can start writing code.

First, the combobox1 must be able to display more than one ip, we set a variable y to accumulate combobox1.items [y],
var y: integer;
Our idea is as follows, when serversocket activities port (port) received on tcp / ip protocol when the link request, return to the other side of the ip value, passed to the combobox is displayed. Activation by the button1 control serversocket, that is, open closed ports.

We serversocket's on clientconnect event to add about code
procedure tform1.serversocket11clientconnect (sender: tobject;
socket: tcustomwinsocket);
begin
combobox1.items.insert (y ,'''');// add a blank record
combobox1.items [y]: = socket.remoteaddress; / / access each other's ip
label1.text: =''were caught''+ inttostr (y +1) +''a ip'';// with a label to display the total number of ip arrested
y: = y +1; / / counter variable by 1
socket.close;
end;
Now, the button1 the caption property is set to''Start'', in its Click event add the following code
procedure tform1.speedbutton7click (sender: tobject);
begin
if speedbutton7.caption =''Start''then
begin
serversocket11.port: = 80; / / phrase can be set in the serversocket properties, capture the browser's connection
serversocket11.active: = true; / / activate the port
speedbutton7.caption: =''stop'';
end
else
begin
serversocket11.active: = false; / / close the port
speedbutton7.caption: =''begin'';
combobox1.clear; / / end of the capture, clear the history information
y: = 0; / / Reset counter variable
end;
end;






Recommended links:



Expert Security And Privacy:



Fax Tools Report



Download flv to mp3 converter



IC card reading and writing in PowerBulider



A Very Nice MP3 Tools



mkv converter FREE



Illustrator plug-in integrated use Of (I)



Airborne managers how to hold to the "Token"?



Shop Kids Education



.m4v file



Modeling With UML to note problems



Mr. Chen spent 450 million U.S. dollars to buy The contents of a box filled with grand



ipod touch video Format



Secret benefits to customers Shi Xiaoen



Flash5 ActionScript Advanced Programming Guide (6)



No comments:

Post a Comment