Follow us on Twitter!
Capitalism is an Island of wealth in a sea of poverty
Thursday, April 17, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 30
Guests Online: 25
Members Online: 5

Registered Members: 82818
Newest Member: Ahmed
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

Running Perl Scripts


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-05-07 01:36
hello

Well, Im here today to find out how to keep a perl script open in command prompt after I run it.
If I wanted it to close I would close the window.

If I was to run this script:
Code
!/usr/bin/perl
use strict;
use warnings;
use Net::DNS;
use NetAddr::IP;

my $ip = new NetAddr::IP (shift) || die "Unable to create NetAddr::IP object\n";
my $res = Net::DNS::Resolver->new;
my $num = $ip->num();

for (my $i=0; $i<=$num; ++$i) {
   my $ip_address = $ip->addr();
   
   if ($ip_address) {
      my $query = $res->search("$ip_address");
      if ($query) {
         foreach my $rr ($query->answer) {
         next unless $rr->type eq "PTR";
         print "$ip_address,",$rr->ptrdname, "\n";
          }
      } else {
         print "$ip_address,",$res->errorstring,"\n";
       }
   }
   ++$ip;
}




and I run:
perl Reverse-DNS Lookups.pl 00.000.000.000 (ip of website)

it will just close. And I got this source code from: http://geekpit.blogspot.com/2006/03/perl-s...everse-dns.html

But I wanted to type it out.

Anyways. Please help!

Thanks in Advanced.


Author

RE: Running Perl Scripts


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 26-05-07 21:42
1. On what OS are you trying to run it?
2. Doesn't it give debug info after running it?
3. The first line should be "#!/usr/bin/perl" , i don't see the # in yours Smile.
Author

RE: Running Perl Scripts


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-05-07 05:29
yeah I got it to work.. Im using on a windows machine so yeah- that was the problem.. I had to point it to perl.exe LOL.

Thanks.