Results 1 to 8 of 8

Thread: whois scripts?

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    36

    Default whois scripts?

    I've been looking around for a script that allows me to feed in a list of IPs or range which will return the Whois information from the entire list of IPs.

    Our PT reports have an appendix which contain the whois output for every ip the company owns. Some of my clients have 100+ IPs, as a result I'm spending entirely too much time running individual whois searches. Yes, I know it's repetitive, it's also a huge time suck for me. But the clients want it, so we do it.

    I've reviewed whois man pages but can't seem to find what I'm looking for.

    Any suggestions?

    Thanks in advance.

  2. #2
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default

    Would be easy to script in bash however you would need to decide what info you wanted to keep out off each whois request. here is some bash to get started.

    Code:
    #!/bin/sh
    for LINE in `cat ip.txt`
    do
      echo "Got [$LINE]"
      whois $LINE >> customer.log
    done
    I'll see if I can add a way to go into each file in a sec.

  3. #3
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    There are several down the list.
    Google

    Skip over the first view as these appear to be scripts that one would need to pay for.
    I would also suggest a check of All commands | commandlinefu.com
    There maybe something of use there as well.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  4. #4
    Junior Member
    Join Date
    Nov 2007
    Posts
    36

    Default

    NICE! That is beyond perfect. Once again, you prove you are the man! You have no idea how much time you've just saved me. THANK YOU HATE!

  5. #5
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    Quote Originally Posted by prelate View Post
    NICE! That is beyond perfect. Once again, you prove you are the man! You have no idea how much time you've just saved me. THANK YOU HATE!
    You can also use the whob command, it will take stdin and stdout that can be redirected.
    Check the -f option in the link.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

  6. #6
    Junior Member
    Join Date
    Nov 2007
    Posts
    36

    Default

    whob = another new one for me. Thanks again guys.

    I searched last night for longer than I care to admit and the only thing I could find was "pay for" scripts or scripts that use languages I'm not comfortable with.

    I posted on this forum and both of you not only helped me right away---but you provided solutions which worked perfectly.

    I owe you a beer. If you're going to Blackhat DC let me know and I'll pay up.

  7. #7
    Developer
    Join Date
    Mar 2007
    Posts
    6,124

    Default

    Glad to help I am always willing to help people with legitimate requests for work.

    If you were really lazy you could add a nslook up line to to resole the host names to IPs for you

    nslookup forums.remote-exploit.com | grep Add | grep -v '#' | cut -f 2 -d ' '

  8. #8
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default

    Glad to be of assistance. I actually looked because you piqued my curiosity on the subject. After probably looking at several of the same links that you may have seen above, I thought there has to be a command or two that would do the same, or what you were after. So I followed the links on the man pages, and found whob. I am actually going to look into it a little more tomorrow after I gather some ip addresses.
    To be successful here you should read all of the following.
    ForumRules
    ForumFAQ
    If you are new to Back|Track
    Back|Track Wiki
    Failure to do so will probably get your threads deleted or worse.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •