Posted By: Rat (prilis mnoho her) on 'CZunix'
Title:     Re: Port Knocking
Date:      Thu Aug 27 12:34:03 2009

> > ntw
> > 
> > #!/usr/bin/perl
> > 
> > use IO::Socket::INET;
> > use Time::HiRes;
> > 
> > $remote_ip = "123.123.123.123";
> > my @porty = qw(30 799 228 305 4049 2557 783 8245 53249 36864);
> > my $msg="";
> > foreach my $port (@porty) {
> >     $MySocket=new IO::Socket::INET->new(PeerPort=>$port,
> >             Proto=>'udp',
> >             Timeout=>1,
> >             PeerAddr=>$remote_ip);
> >     $MySocket->send($msg);
> >     Time::HiRes::usleep(10000);....
> > }
> 
> A co takhle ten socket taky zavirat? To sou ti lenosi, co spolehaji na
> Brano! 

Explicitni uvolnovani resourcu v reference counting gb jazycich je prezitek. 
Na druhe strane, aspon "my $MySocket" by tam byt mohlo. use strict; use 
warnings; 


>                                                        tdr, v.r.

        Krysa, vlastni klavesnicou
                rat@atrey.karlin.mff.cuni.cz              Jsem Krysa
                http://atrey.karlin.mff.cuni.cz/~rat/

Search the boards