Re: problem with a looop and with a site
- From: "DJ Stunks" <DJStunks@xxxxxxxxx>
- Date: 26 Feb 2006 12:33:12 -0800
alex123x@xxxxxxxxx wrote:
Hello all,
The program runs a loop and each time it sends a signal to the site and
checks whether its ok or not and then it creates a file with the name
of the good port
but the program doesnt work and i dont know what to do, plz help me
use strict;
use LWP::Simple;
my $i=1;
my ($site);
open (FH,">c:/portss.txt") or die "Ahhh";
while ($i<10000) {
$site = get("http\:\/\/connect.majestyc
.net\/\?t=$i\&u=80");
open (FH,">c:/portss.txt");
print (FH $site,"\n");
foreach (<FH>) {
if ($_=~m/Connected OK/i){
open (ST,">C:/Downloads/$1.txt");
}}
$i=$i+1;
}
this is NOT the way to write a port scanner; you have a LOT of reading
to do.
also, look into what characters actually need delimiting in a double
quoted string.
-jp
.
- References:
- problem with a looop and with a site
- From: alex123x@xxxxxxxxx
- problem with a looop and with a site
- Prev by Date: problem with a looop and with a site
- Next by Date: Printing An Array
- Previous by thread: problem with a looop and with a site
- Next by thread: Printing An Array
- Index(es):