Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Script for querying blacklists databases

    I was wondering if anybody knows of a script that I could install on my server
    and use to do a query in RBL databases, just like this page

  2. #2
    Join Date
    Dec 2006
    I use this function:

    function dnsbl($ip,$list,$mappings) {
            $lookup = implode('.',array_reverse(explode('.', $ip))) . '.' . $list;
            $result= gethostbyname($lookup);
            if ($lookup==$result) {
                    return "Not listed";
            foreach($mappings as $k=>$v) {
                    if ($result==$k) {
                            return $v;
            return "Address listed with unknown code: $result";
    And it is called passing the IP address in string format, the address of the blacklist, and an array of what the various response IP addresses mean. e.g. for sorbs:

    print dnsbl($ip,"",
            array(""=>"Open http proxy server",
                    ""=> "Open socks proxy server",
                    ""=> "Open proxy server (other than http/socks)",
                    ""=> "Open SMTP mail relay",
                    ""=> "Sender of spam email",
                    ""=> "HTTP server with security holes",
                    ""=> "Site refuses to be tested by SORBS (likely spammer)",
                    ""=> "Network hijacked by spammers",
                    ""=> "Known end user address",
                    ""=> "Domain has broken DNS configuration",
                    ""=> "Host should not send email"));

  3. #3
    Join Date
    Jul 2007
    I use the check_rbl plugin in Nagios to check the blacklist status of the IPs of my servers. It alerts me if any IP is blacklisted in specific Blacklist databases.
    Prashant T.

    Don't run after Success. Run after Excellence and Success will soon follow.

Similar Threads

  1. is there any program or script that can search mysql databases?
    By CNSERVERS in forum Hosting Security and Technology
    Replies: 8
    Last Post: 09-02-2007, 01:36 PM
  2. Fantastico script creating databases but not tables
    By igloogle in forum Hosting Security and Technology
    Replies: 6
    Last Post: 10-24-2006, 07:07 AM
  3. PHP: Querying cmd in Windows...
    By UrlGuy in forum Programming Discussion
    Replies: 5
    Last Post: 07-12-2005, 11:56 PM
  4. Script to dump all mySQL databases?
    By portalplanet in forum Programming Discussion
    Replies: 4
    Last Post: 11-18-2004, 01:10 PM
  5. script to automate backups of my MySQL databases?
    By steveryan in forum Web Hosting Lounge
    Replies: 0
    Last Post: 11-04-2002, 06:45 PM

Posting Permissions

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