Message Board

http:BL Use/Development

Older Posts ]   [ Newer Posts ]
 Lookup Tool (http:BL)
Author: J.Yard2   (29 Apr 07 5:22am)
Here's a basic http:BL lookup tool, mostly using code others have posted here.

httpBL_Lookup.html
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>http:BL Lookup</title>
</head>

<body>

<form method="POST" action="/httpBL_Lookup.php">
<p>
IP Address:<br>
<input type="text" name="IP" size="20"><br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2">
</p>
</form>

</body>
</html>

httpBL_Lookkup.php
<?PHP
// Enter you http:BL Access Key issued at http://www.projecthoneypot.org/httpbl_configure.php below
$theBLKey = 'abcdefghiklm';

// Build the URL to lookup as specified at http://www.projecthoneypot.org/httpbl_api.php and do the lookup
$theLookup = $theBLKey . "." . implode('.', array_reverse(explode ('.', $_POST['IP']))) . '.dnsbl.httpbl.org';
//$theLookup = $theBLKey . "." . implode('.', array_reverse(explode ('.', $_GET['IP']))) . '.dnsbl.httpbl.org';
//$theLookup = $theBLKey . "." . implode('.', array_reverse(explode ('.', "127.1.1.1"))) . '.dnsbl.httpbl.org';
//$theLookup = $theBLKey . "." . implode('.', array_reverse(explode ('.', $_SERVER['REMOTE_ADDR']))) . '.dnsbl.httpbl.org';

// Get the http:BL
$theResult = gethostbyname($theLookup);

// Check if data was returned
$theExplodedResult = explode('.', $theResult);

// Get the name
$theName = gethostbyaddr($_POST['IP']);

$Status = "(Not In Database)";
if ($theExplodedResult[0] == '127') $Status = "(In Database)";

echo "IP Address: " . $_POST['IP'] . "<br>";
echo "Name: " . $theName . "<br>";
echo "<br>";
echo "First Octet: <b>" . $theExplodedResult[0] . "</b> " . $Status . "<br>";
echo "Last Honey Pot Activity: <b>" . $theExplodedResult[1] . "</b> Days Ago. <br>";
echo "Honey Pot Assigned Threat Level: <b>" . $theExplodedResult[2] . "</b> (0 = Low, 255 = High). <br>";
echo "Honey Pot Assigned Visitor Type: <b>" . $theExplodedResult[3] . "</b> (See Below). <br>";

if ($theExplodedResult[3] == 0) echo "       Search Engine <br>";
if ($theExplodedResult[3] & 1) echo "       Suspicious <br>";
if ($theExplodedResult[3] & 2) echo "       Harvester <br>";
if ($theExplodedResult[3] & 4) echo "       Comment Spammer <br>";
if ($theExplodedResult[3] >= 8) echo "       [Reserved for Future Use] <br>";
?>

Post Edited (29 Apr 07 3:12pm)
 
 Re: Lookup Tool (http:BL)
Author: S.Enbom   (13 May 07 3:04am)
I've been trying to modify this to work as s shellscript too but I'm not skilled enough in the way of computerscripting. Can anyone help please?



do not follow this link

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

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

contact | wiki | email