Message Board

http:BL Use/Development

Older Posts ]   [ Newer Posts ]
 http:BL Developers Wanted
Author: M.Prince   (26 Apr 07 10:53pm)
We are looking for individuals to help us incorporate the http:BL service into as many platforms as possible. You a WordPress Plugin Master? We need your help. Want to write a ColdFusion module that queries the http:BL DNS? We'd love it.

We'll be setting up a page for people to download all your creations, so please pass them along if you're willing to share.
 
 Re: http:BL Developers Wanted
Author: B.Engert   (27 Apr 07 1:55am)
I just wrote a php class that I think works with php 4 any way it's really simple to use you set the key and then run something like

$dnsbl = new httpbl();
$responce = $dnsbl->isListed("209.167.50.22")
if ($responce['threat'] > 200)
die();
else if ($responce['Comment_Spammer'])
die();
else if ($responce['Harvester'])
{
echo "fake@myhoneypot.org";
die();
}

I am releasing it under gpl so have fun.

http://lart2150.com/HttpBL/projecthoneypot.dnsbl.zip

Post Edited (27 Apr 07 1:57am)
 
 Re: http:BL Developers Wanted
Author: J.Yard2   (27 Apr 07 3:51am)


Post Edited (27 Apr 07 3:52am)
 
 Re: http:BL Developers Wanted
Author: J.Wesley2   (27 Apr 07 2:23pm)
This doesn't work under PHP 4 without a couple of mods:

Basically php4 doesn't know about public and private, so remove them from the function declarations, and replace the private keywords on the variables with 'var'.

The modified class still works with PHP5 :)

thanks for the class though - very useful
 
 Re: http:BL Developers Wanted
Author: M.Prince   (27 Apr 07 3:43pm)
If you're willing, please send us or post the code!
 
 Re: http:BL Developers Wanted
Author: J.Wesley2   (28 Apr 07 5:19am)
Here you go :)


This is compatible with PHP4 and PHP5.

<?php

/*

* Copyright 2007 Brian Engert (lart@engert.us)

*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2 of the License, or

* (at your option) any later version.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

*/

class httpbl

{

var $key = "abcdefghijkl";

var $host = "dnsbl.httpbl.org";



function isListed($ip)

{

$reverseip = $this->reverse_IP($ip);



if (!$reverseip)//was it a valid ish ip?

return false;

//echo "resolved?: " . gethostbyname($this->key . '.' . $reverseip . '.' . $this->host);

$responce = gethostbyname($this->key . '.' . $reverseip . '.' . $this->host);

if (strstr($responce, $this->host))

{

return false;//if the domain does not resolve then it will be the same thing we passed to gethostbyname

}

//print_r($responce);

//echo "\n";

$responce = explode("." ,$responce);

$values = array();

$values['last_activity'] = $responce[1];

$values['threat'] = $responce[2];



if ($responce[3] == 0)//if it's 0 then there's only 1 thing it can be

$values['Search_Engine'] = true;

if ($responce[3] & 1)//does it have the same bits as 1 set

$values['Suspicious'] = true;

if ($responce[3] & 2)//does it have the same bits as 2 set

$values['Harvester'] = true;

if ($responce[3] & 4)//does it have the same bits as 4 set

$values['Comment_Spammer'] = true;



return $values;

}

function reverse_IP($ip)

{

preg_match("/[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}/", $ip, &$matches);

$ip = explode(".", $matches[0]);

//print_r($ip);//debug code :-D

if (count($ip)!=4)

return null;

return $ip[3] . '.' . $ip[2] . '.' . $ip[1] . '.' . $ip[0];

}

}

/*example code

echo "<pre>";

$dnsbl = new httpbl();

print_r($dnsbl->isListed("209.167.50.22"));

echo "</pre>";

*/

?>
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (28 Apr 07 6:28am)
I could create a Drupal module if there is some proper PHP code available (above code looks good but can use some improvements). Maybe there should be some 'official' library with PHP/ASP/etc. code besides implementations for other projects like WordPress and Drupal (which use PHP).
 
 Re: http:BL Developers Wanted
Author: J.Haywood   (28 Apr 07 7:41am)
So using your class file, you could do something like

$visitor= $_SERVER['REMOTE_ADDR'];
echo $visitor;
echo "<pre>";
$dnsbl = new httpbl();
print_r($dnsbl->isListed($visitor));
echo "</pre>";

Would that work?
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (28 Apr 07 1:50pm)
I've got the Drupal module nearly finished.

PS.: The above PHP code contains a bug; a period (.) should be added to the end of the gethostbyname-URI to make it work.
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (28 Apr 07 2:33pm)
It's there: http://ceaseless.ws/httpbl/
 
 Re: http:BL Developers Wanted
Author: S.Enbom   (29 Apr 07 3:44am)
Wow, a Drupal module, that was quick. Thanks. I hope you have the time, inspiration and energy to keep refining it.

The global whitelisting idea sounds good. Maybe it would work together with the commenting of IP's feature Project HoneyPot has.

Maybe this module could be made to work chained together with the Akismet module? http://drupal.org/project/akismet

Would be nice if comment spambots would be presented with a form that looks real; has the same input fields as real Drupal/Wordpress/other popular CMS.
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (29 Apr 07 7:09am)
Akismet is a totally different thing: it determines if a comment is spam by sending it to the Aksimet web service which then rates its spam probability.

Presenting a real form is possible; the question then is where any posted data should go. It'd be most useful if it would be posted to Project Honeypot so the spammer will be listed. The current comment spam implementation of Project Honeypot doesn't take URL-guessing into account: many spambots work by guessing URLs to comment forms. A CMS-level implementation (like this module) can help with solving that issue, but would require openness about the honeypot's structure/API.

By the way; I'll need some people that can test the module on their site, preferably one with some comment spam so we can check the effect.
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (29 Apr 07 7:56am)
The module has been updated with a simple interface to add a honeypot link to the ban page.
 
 Re: http:BL Developers Wanted
Author: S.Enbom   (29 Apr 07 12:21pm)
In my opinion Akismet isn't totally different since spam messages that are caught by Akismet or that one flags as spam are also contributed to the central Akismet database which makes it all works so well.

I'm testing your module now. Will let you know how it seems to be working.
 
 Re: http:BL Developers Wanted
Author: M.Prince   (29 Apr 07 3:11pm)
I think Akismet and http:BL are complementary but work at different stages in the process. Http:BL has the potential to keep bad robots completely off your site before they try and post or sap any of your bandwidth or server resources. Akismet is extremely good at stopping posts through a number of different comment spam tests, but does not keep the robots off your site in the first place.

I think what would be ideal is to cooperate with Akismet to share data between the two projects. We could add http:BL as another check to the Akismet system, and Akismet could share back IPs of known comment spammers that we could put into http:BL. I'd love to do this if anyone has any connections to Matt and the rest of the Akismet team.
 
 Re: http:BL Developers Wanted
Author: J.Wesley2   (29 Apr 07 4:08pm)
J.Haywood : Yup that would work :)

Post Edited (29 Apr 07 4:09pm)
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (29 Apr 07 7:42pm)
I think integration with Akismet should work via the Honeypot's comment spam form (so via Project Honey Pot).

I don't see how the Drupal module (or in fact any other CMS module) would work with Akismet. It would have to display a regular comment form, query http:BL on submit and report to Akismet if blacklisted (=spam). This means the spam comment won't reach Project Honey Pot -- it would if there would simply be a honeypot.

Post Edited (30 Apr 07 7:20am)
 
 Re: http:BL Developers Wanted
Author: S.Enbom   (30 Apr 07 3:33pm)

I have a feeling most comment-spambots try to recognize which CMS (wordpress/phpbb/drupal) the site runs on and then proceeds to the right forms, instead of just blindly trying to post on every form it sees.

Because of this I believe P.H.P would catch spammers more efficiently by emulating real CMS forms.

Maybe the P.H.P commentspam honeypot API should be further developed and opened up so other honeypotsystems etc easily could use it to submit data to P.H.P.
If you build it they will come. ?

The commentspam honeypots should be more dynamically created by a wordpress/drupal/phpbb-module instead of only existing on ones normal P.H.P script. The honeypot form items would be hidden from humans by CSS and other methods, and ideas such as reverse capcha, from this document http://nedbatchelder.com/text/stopbots.html should be used. If a bot submits data to the wrong humanly invisible form then the message will not be posted + spam goes to P.H.P etc etc.




Today I've received two comment spams from IP's that arent harvester/commentspammer blacklisted (but have been seen by P.H.P or are mail servers). They where submitted to Akismet but unfortunately I couldn't click "submit to P.H.P" the same way.
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (30 Apr 07 4:31pm)
Agreed. That's where Akismet integration would come in handy (but again, the best would be Akismet on a global level, not via script level APIs).

The problem with extensive script level APIs is that it'll be easier for the PHP database to get filled up with false positives. A nice way would be mod_rewrite- or CMS-level routing of non-existent comment forms to a honeypot provided by P.H.P. targeted at exactly that CMS.
 
 Re: http:BL Developers Wanted
Author: M.Heumann   (3 May 07 3:59pm)
The SpamCatching module for the Oddmuse wiki can now be used to query the http:BL. See http://www.oddmuse.org/cgi-bin/oddmuse/SpamCatching_Module for more information.
 
 Re: http:BL Developers Wanted
Author: M.Jervis   (7 May 07 2:59am)
<blockquote>
I have a feeling most comment-spambots try to recognize which CMS (wordpress/phpbb/drupal) the site runs on and then proceeds to the right forms, instead of just blindly trying to post on every form it sees.
</blockquote>

Yes, our experience at Geeklog is very much that there are custom spambots designed for each CMS. We often spot traffic in our logs that appears to be new geeklog spambot debugging. Or perhaps just bad spambots?

The best of these spam bots actually adapt to anti-spam measures in the forms directly. For example, some techniques documented on the web include changing the form post url randomly, or re-writing form elements with javascript. I've seen bots adapt intellegently to this.

So it's a combination of techniques needed.

In Geeklog, we have a number of filters used to analyse incoming posts. Various types of blacklist essentially, plus badbehaviour integration. I've not seen any false positives in my anti-spam filters on my sites.

We could include a SpamX action to automatically report an IP address to PHP when it's detected as a spammer.
 
 Re: http:BL Developers Wanted
Author: S.Enbom   (11 May 07 2:50am)
You'r module seems to be working very well M. Janssen, catching roughly 20 bots per day on my main site.
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (11 May 07 7:25pm)
What's the deal with "the basic service will be free"? If you'll be charging for this, I want to be paid for developing!
 
 Re: http:BL Developers Wanted
Author: M.Prince   (12 May 07 3:24am)
Our intent is for the basic http:BL service -- everything available today -- to always be free. If a user uses an excessive amount of bandwidth in such a way that it harms other users then we may, at a future date, decide to charge the user to offset the cost of the additional bandwidth.

While we think of Project Honey Pot as a public service project, the reality is that we need to pay the cost of running servers and supplying data over leased pipes. This costs money. We offset those costs with both generous donations and some limited revenue sources. However, if Yahoo starts using http:BL and querying every time someone hits one of their pages, we'll need to figure out some way to pay for the additional server resources we'd need to handle the load.

Finally, please note, we do not restrict in any way your ability to charge for tools you create to take advantage of http:BL. If you make a tool that uses http:BL data and can sell it to the marketplace, we encourage you to do so.

D.Shechtman: Please let us know what it is you're developing or have developed and we're happy to help you promote it. So far as I can tell, this is the first message you've ever posted about a development project or anything else.
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (12 May 07 8:07am)
I consider developing a phpBB MOD. There's already an article that covers using http:BL on phpBB, but I'm thinking about a more straightforward process (i.e. EasyMOD installation plus one simple change to the board's configuration).

http://www.phpbb.com/kb/article/httpbl-on-phpbb-fight-back-against-spammers/
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (14 May 07 5:47am)
I take it from your lack of response that http:BL isn't yet ready for mass consumption as a link spam filter (what you call "comment spam").

I shall wait.
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (19 May 07 6:50pm)
OK, I'm not waiting any longer. Just released the first beta; improved Brian Engert's class bundled.

http://www.phpbb.com/community/viewtopic.php?f=16&t=540849
 
 Re: http:BL Developers Wanted
Author: J.Fortune   (27 May 07 11:47pm)
Made a couple of changes to JWesley2's fine script:

1. Check first octet for a value of "127". According to the API, anything else is an error, so I decided to let it slide as a non-threat. For my own IP address, I was getting goofy results (but only on the production server).

2. Added a threat_level method for simplicity in the calling web pages. This makes it easy to insert CAPTCHA code if the threat level exceeds any value you want. See the last example. I didn't want to ban anyone (our site is largely marketing), so the bad guys get a CAPTCHA and the good guys don't (hopefully). I'd like to keep the site accessible to the disabled, if feasible.

<?php
/*
* Copyright 2007 Brian Engert (lart@engert.us)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

class httpbl {

var $key = "yourkey";
var $host = "dnsbl.httpbl.org";

function isListed($ip) {
$reverseip = $this->reverse_IP($ip);

if (!$reverseip)//was it a valid ish ip?
return false;

//Debugging only
//echo "Request: ".$this->key . '.' . $reverseip . '.' . $this->host."<br>";
//echo "resolved?: " . gethostbyname($this->key . '.' . $reverseip . '.' . $this->host)."<br>";

$responce = gethostbyname($this->key . '.' . $reverseip . '.' . $this->host);


if (strstr($responce, $this->host)) {
return false;//if the domain does not resolve then it will be the same thing we passed to gethostbyname
}

//echo "Responce is ";
//print_r($responce);
//echo "\n";

$responce = explode("." ,$responce);

if ($responce[0] != 127)
return false; //First octet must be 127, else there is an error condition
$values = array();
$values['last_activity'] = $responce[1];
$values['threat'] = $responce[2];

if ($responce[3] == 0)//if it's 0 then there's only 1 thing it can be
$values['Search_Engine'] = true;
if ($responce[3] & 1)//does it have the same bits as 1 set
$values['Suspicious'] = true;
if ($responce[3] & 2)//does it have the same bits as 2 set
$values['Harvester'] = true;
if ($responce[3] & 4)//does it have the same bits as 4 set
$values['Comment_Spammer'] = true;

return $values;
}

function reverse_IP($ip) {
preg_match("/[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}.[0-9]{1,4}/", $ip, $matches);
$ip = explode(".", $matches[0]);
//print_r($ip);//debug code :-D
if (count($ip)!=4)
return null;
return $ip[3] . '.' . $ip[2] . '.' . $ip[1] . '.' . $ip[0];
}

function threat_level($ip) {
$answer = $this->isListed($ip);
if ($answer == false) return 0;
return $answer["threat"];
}
}


/*example code
echo "<pre>";
$dnsbl = new httpbl();
$visitor= $_SERVER['REMOTE_ADDR'];
$answer = $dnsbl->isListed("127.0.0.1");
if ($answer == false) {
print_r("No threat");

}
else {
print_r($answer);
}
echo "</pre>";
*/

/*example code with just threat level
$dnsbl = new httpbl();
echo 'Threat level: '.$dnsbl->threat_level("81.177.22.243");
*/

/*CAPTCHA example*/
//Check for malicious IP (do a session_start() as the first line of the page)
include "./hpot/httpbl.php";
$dnsbl = new httpbl();
if ($dnsbl->threat_level($_SERVER['REMOTE_ADDR']) > 0) {
include "captcha.inc"; //Another row of form elements and CAPTCHA logic
}
else {
//set verification code for user to make form handler happy
echo "<input type=\"hidden\" name=\"verificationcode\" value=\"".$_SESSION['verification_key']."\">";
}

?>
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (28 May 07 7:37am)
Re: CAPTCHA

I believe this tool's raison d'etre is the fact that CAPTCHAs don't work. See e.g. http://blog.phpbb.cc/articles/captcha/

Re: Improved class httpbl

Did you look at my version? Maybe it's best to establish a single branch rather than having five different forks?
 
 Re: http:BL Developers Wanted
Author: J.Fortune   (28 May 07 4:06pm)
While it is certainly possible to do OCR on CAPTCHA, I think as a practical matter it's still too difficult for most harvesters. They wil move on to another site. PHPBB is probably worth the effort for harvesters but our site isn't. (And if someone really wants your car, a lack of keys won't really stop them). Again, I'd rather not slow the user down one iota if they check out. We use our website to generate business, not as a blog or BB so easy user experience is priority (and we would never, ever blacklist anyone on the word of a third party). Our public account gets bombarded but it's managable. When our site becomes high volume, I could change my mind :-).

I do remember looking at the site you referenced, but didn't immediately see the source. Yes, it would be nice to have a common and updated source. The original script with a couple of tweaks seems to work for me at present.
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (29 May 07 5:26am)
http://sourceforge.net/project/showfiles.php?group_id=154205&package_id=232576

Scroll down the page to the first download ;-)
 
 Re: http:BL Developers Wanted
Author: G.Byers   (29 May 07 11:16am)
deleted please disregard

Post Edited (31 May 07 3:27pm)
 
 Re: http:BL Developers Wanted
Author: M.Janssen   (31 May 07 6:08pm)
The Drupal module has some good PHP code and is probably also faster than the above code. The core http:BL functions don't use a lot of Drupal functions either so modifying it for other PHP scripts should be pretty straightforward.
 
 Re: http:BL Developers Wanted
Author: J.Haywood   (2 Jun 07 10:36am)
D.Shechtman - thanks for the phpBB MOD, it works great!
I'm porting it over for the phpNuke content management system which uses phpBB
 
 Re: http:BL Developers Wanted
Author: D.Shechtman   (3 Jun 07 1:21pm)
I'm glad to hear that. I hope Nuke users will find it helpful.
 
 Re: http:BL Developers Wanted
Author: A.Z4   (5 Jun 07 11:34pm)
---Want to write a ColdFusion module---

this is in CF5

<cfparam name="url.ip" default="">
<br />
<form method="get">
<input type="text" maxlength="15" name="ip" value="<cfoutput>#url.ip#</cfoutput>"><input type="submit" name="go" value="go">
</form>
<cfset access_key = "your access key goes here">
<cfset httpbl_host = "dnsbl.httpbl.org">
<cfset ip_in = url.ip><!--- cgi.REMOTE_ADDR could go gere --->
<cfif IsDefined("ip_in") and ip_in neq "">
<cfset reversed_ip ="">
<cftry>
<cfloop from="#ListLen(ip_in, '.')#" to="1" step="-1" index="octet">
<cfset reversed_ip = ListAppend(reversed_ip, ListGetAt(ip_in, octet, "."), ".")>
</cfloop>
<cfset full_reverse_ip = access_key & '.' & reversed_ip & '.' & httpbl_host>
<br />
<cfset java_look_up = createobject("java", "java.net.InetAddress")>
<cfset java_look_up_response = java_look_up.getByName(full_reverse_ip)>
<cfset boo =ListLast(java_look_up_response, "/")>
<cfoutput>#boo#</cfoutput>
<cfset responce_len=ListLen(boo,'.')>
<cfif responce_len eq 4>
<cfswitch expression="#ListGetAt(boo,4,'.')#">
<cfcase value="1">
['Search_Engine']
</cfcase>
<cfcase value="2">
['Suspicious']
</cfcase>
<cfcase value="3">
['Harvester']
</cfcase>
<cfcase value="4">
['Comment_Spammer']
</cfcase>
<cfcase value="5">
['Suspicious & Comment Spammer ']
</cfcase>
<cfcase value="6">
['Harvester & Comment Spammer ']
</cfcase>
<cfcase value="7">
['Suspicious & Harvester & Comment Spammer']
</cfcase>
</cfswitch>
</cfif>
<cfcatch>
No response or bad response.
</cfcatch>
</cftry>
</cfif>

it's pretty much self explanatory, it could probably could be condensed to a 5 liner, but I was to lazy to write comments.

:)

Post Edited (6 Jun 07 12:07pm)
 
 Re: http:BL Developers Wanted
Author: M.Marrotte   (4 Sep 07 2:23pm)
/*
* HttpBL.java
*
*/

package httpbl;
import java.net.InetAddress;

/**
*
* @author Mike Marrotte -- marrotte@gmail.com
*
*/
public class HttpBL {
private String accessKey = "";
private String listSpecificDomain = "";
private String visitorType = "";
private HttpBLDNSQueryResponse httpBLDNSQueryResponse = new HttpBLDNSQueryResponse();
private String[] ipArray = null;
private String octetReversedIP = "";
private String host = "";
private String response = "";
private String[] responseArray = null;

public HttpBL(String accessKey, String listSpecificDomain){
this.accessKey = accessKey;
this.listSpecificDomain = listSpecificDomain;
}

public HttpBLDNSQueryResponse getDNSQueryResponse(String ipAddress) throws Exception {
if (accessKey != "" && listSpecificDomain != "" && ipAddress != "") {
ipArray = ipAddress.split("\\.");
octetReversedIP = ipArray[3] + "." + ipArray[2] + "." + ipArray[1] + "." + ipArray[0];
host = accessKey + "." + octetReversedIP + "." + listSpecificDomain;
response = InetAddress.getByName(host).toString().split("/")[1];
responseArray = response.split("\\.");
httpBLDNSQueryResponse.setDaysLastActive(Integer.parseInt(responseArray[1]));
httpBLDNSQueryResponse.setThreatScore(Integer.parseInt(responseArray[2]));
httpBLDNSQueryResponse.setVisitorTypeCode(Integer.parseInt(responseArray[3]));
}
return httpBLDNSQueryResponse;
}
public void setAccessKey(String accessKey){this.accessKey = accessKey;}
public void setListSpecificDomain(String listSpecificDomain){this.listSpecificDomain = listSpecificDomain;}
}

/*
* DNSQueryResponse.java
*
*/

package httpbl;

/**
*
* @author Mike Marrotte -- marrotte@gmail.com
*
*/
public class HttpBLDNSQueryResponse {

private int daysLastActive = 0;
private int visitorTypeCode = 0;
private int threatScore = 0;
private String visitorType = "";
private String host = "";


public void setDaysLastActive(int daysLastActive){this.daysLastActive = daysLastActive;}
public void setVisitorTypeCode(int visitorTypeCode){this.visitorTypeCode = visitorTypeCode;}
public void setThreatScore(int threatScore){this.threatScore = threatScore;}

public int getDaysLastActive(){return daysLastActive;}
public int getVisitorTypeCode(){return visitorTypeCode;}
public int getThreatScore(){return threatScore;}
public String getVisitorType(){
switch (visitorTypeCode) {
case 0: visitorType = "Search Engine"; break;
case 1: visitorType = "Suspicious"; break;
case 2: visitorType = "Harvester"; break;
case 3: visitorType = "Suspicious & Harvester"; break;
case 4: visitorType = "Comment Spammer"; break;
case 5: visitorType = "Suspicious & Comment Spammer"; break;
case 6: visitorType = "Harvester & Comment Spammer"; break;
case 7: visitorType = "Suspicious & Harvester & Comment Spammer"; break;
default: visitorType = "Undefined"; break;
}
return visitorType;
}

}
/*
* Main.java
*
*/

package httpbl;
import java.net.InetAddress;

/**
*
* @author Mike Marrotte -- marrotte@gmail.com
*
*/

public class Main {
private static String accessKey = "[your access key goes here]";
private static String listSpecificDomain = "dnsbl.httpbl.org";
private static String ipAddress = "[some ip address goes here]";

public Main() {
}

public static void main(String[] args) throws Exception {

HttpBL httpBL = new HttpBL(accessKey, listSpecificDomain);
HttpBLDNSQueryResponse httpBLDNSQueryResponse = httpBL.getDNSQueryResponse(ipAddress);

System.out.println("Last Active: "+httpBLDNSQueryResponse.getDaysLastActive());
System.out.println("Threat Score: " + httpBLDNSQueryResponse.getThreatScore());
System.out.println("Visitor Type: "+ httpBLDNSQueryResponse.getVisitorType());
System.out.println("Visitor Type Code: " + httpBLDNSQueryResponse.getVisitorTypeCode());
}

}



do not follow this link

Privacy Policy | Terms of Use | About Project Honey Pot | FAQ | Cloudflare Site Protection | Contact Us

Copyright © 2004–25, Unspam Technologies, Inc. All rights reserved.

contact | wiki | email