Neueste Artikel:
Blogroll:
- Retention Modul hinüber
- Änderungen am Honeypot
- Opera mini
- ICQ wurde an Russland verkauft
- In eigener Sache: Änderungen am Public Key
- Ubuntu Lucid Lynx in der Beta 1
- Neues Ubuntu (Lucid Lynx) in der dritten Alpha
- Horst Köhler hat das umstrittene Gesetz von Zensursula unterschrieben
- WPA2 mit EAP
- Neues image.gd Script
Blogroll:
- Yamas Blog
- T400
- Planet Pytal
- Ein Mädchen erobert Linux Mint
- Dinis Blog
- Blog@denscoNET
- Björns Blog
- ax86
- Aus dem Leben eines angehenden Informatikers
Honeypod Code - PHP-Snipplet · Sonntag März 29, 2009
Ein Stück PHP Code zu Honeypot
Funktioniert auf jeden Fall standalone, braucht aber PHP5.
EN: A short PHPCode snipplet for Honeypot. Works for testing purposes standalone, but needs PHP5.
Download: httpbl.php
Working example here …: Klick me!
I know it is white, that meens you’re not a spamer :) – go take a cup of coffee and get your own api key.
- <?php // Honeypot Module
- $key = "BLABLABLA"; // Your API Key
- $honig = "http://example.org/link/to/honeypot.php"; // Your Honeypot
- $ip = implode( ".", array_reverse(explode(".",$_SERVER["REMOTE_ADDR"]))); // Visitor IP
- $result = dns_get_record($key . "." . $ip . "." . "dnsbl.httpbl.org",DNS_A); // the query :)
- $toleranz = 20; // higher values = more tolerance - the threadlevel;
- $days = 30; //Bot will not be checked if last activity is above $days days
- $data = explode (".",$result[0]['ip']);
- if ($data[0] == 127) {
- if ($data[1] < $days) {
- $spam = '1';
- }
- if ($data[2] > $toleranz) {
- $spam .= '1';
- }
- if ($data[3] > 1)
- {
- $spam .= '1';
- }
- if ($data[2] > 70)
- {
- $spam = '111';
- }
- }
- if (strcmp('111',$spam) == 0) {
- $blocked = true;
- header( "HTTP/1.1 301 Moved Permanently ");
- header( "Location: $honig" );
- }
- if ($blocked) die(); ?>
Kategorie: blogging
— BloodyWing
Kommentare

