Wat doet dit scriptje ?

Status
Niet open voor verdere reacties.

michaelclaes

Gebruiker
Lid geworden
6 mrt 2007
Berichten
5
Ik check vandaag mij ftp server, blijkt dat iemand er er in is geslaagd volgend script te uploaden zonder dat het werd gelogd door mijn database !
Graag had ik geweten wat het juist doet.
Alvast bedankt.

HET SCRIPT ->

use IO::Socket;
$sock=IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"www.nasa.gov",PeerPort=>"445") or die ("Error");
print "+";

while ($ans=<$sock>) {
print $ans;
}
 
A program that wishes to receive a connection from another program, asks the operating system to create a socket and bind it to some port. Then the program sits and listens on the socket it has created to receive incoming connections. The other program also creates a socket for communicating witht he receiver. The caller needs to specify the IP address and the port number of the receiving end. If all goes well, and as we will see shortly, the two programs establish a communication through the network using their sockets. The two programs may exchange information, each by writing to and reading from the socket it has created.
Bron
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan