Hello whord, i have this code but its problem i want check file list ips and check http & https and i want all string Title
#!/usr/bin/perl use Parallel::ForkManager; use LWP::UserAgent; use LWP::Protocol::https; use Net::SSL; my @foundip; my $save = "result.txt"; my $i = 0; my $forkmanager = new Parallel::ForkManager->new("20"); $forkmanager->run_on_finish(sub { # must be declared before first ' +start' my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data) = @ +_; $out{ $data->[0] } = $data->[1]; #print "[onfinish]". $data->[0] ."\n"; if (($data->[1] == -1) or ($data->[1] == 1)) { push(@foundip,$data->[0]); } }); my $foundstring; my $cnt =0; my $match_found = 0; open($foundipFILE, "< ip"); while (<$foundipFILE>) { $line = $_; $line =~ s/\x0a//g; if (!grep {$_ eq $line} @foundip) { $cnt++; my $pid = $forkmanager->start and next; alarm("20"); $rez = 0; $rez = do_shit($line); #print "$cnt\r\n"; $forkmanager->finish(0, [ $line, $rez ]); # +Child exits }else{ #print "!!!!! $line was here\n"; } } close($foundipFILE); $forkmanager->wait_all_children(); print "\n!!!!! FINISH !!!!!!\n"; exit; sub do_shit{ my $line = shift; my ($ip,$port) = split (/:/, $line, 2); $link = "https://$line"; #print "$link\n\r"; $link = "http://$line"; print "\e[31mScaning $link\r\e[0m"; #start here my $browser = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 } +,); $browser->timeout(60000); my $response = $browser->get("$link"); my $head = $response->as_string(); #print $head; @types = ('google', 'yahoo', ); foreach(@types){ #print $type; if($head =~ m/(.*)$_(.*)/i) { #search for the key word print "\e[33mFound $link $_\r\n\e[0m"; open(OUTPUT,">>$save"); print OUTPUT "$link $_\r\n"; print OUTPUT "###################\r\n"; close (OUTPUT); } else { next; } } }

In reply to Get Title ip's list browser by alaa21a

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.