Services_ProjectHoneyPot
[ class tree: Services_ProjectHoneyPot ] [ index: Services_ProjectHoneyPot ] [ all elements ]

Class: Services_ProjectHoneyPot

Source Location: /Services_ProjectHoneyPot-0.6.0/Services/ProjectHoneyPot.php

Class Overview


A class to interface services provided by ProjectHoneyPot.org


Author(s):

Version:

  • Release: 0.6.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 72]
A class to interface services provided by ProjectHoneyPot.org


[ Top ]


Class Variables

$accesskey =

[line 91]


Type:   string


[ Top ]

$debug =  false

[line 111]


Type:   bool


[ Top ]

$dns_blacklist =  'dnsbl.httpbl.org'

[line 97]


Type:   string


[ Top ]

$honeypot =

[line 118]


Type:   string


[ Top ]

$resolver =

[line 104]


Type:   Net_DNS2_Resolver


[ Top ]



Method Detail

__construct (Constructor)   [line 133]

Services_ProjectHoneyPot __construct( [string $accesskey = null], [ $resolver = null], [bool $debug = null])

Initialize the class.

Parameters:

string   $accesskey     The accesskey provided by Project HoneyPot.
mixed   $resolver     'null' or Net_DNS2_Resolver.
bool   $debug     Enable debug, or maybe not? :-)

[ Top ]

getHoneyPot   [line 383]

string|array|null getHoneyPot( )

Mostly a placeholder for what's to come. Currently we return a honeypot which has been supplied with self::setHoneypot before.

[ Top ]

getHostForLookup   [line 328]

string getHostForLookup( string $ip)

Builds the host to query.

Parameters:

string   $ip     The IP which needs to be resolved.

[ Top ]

makeRequest   [line 266]

Services_ProjectHoneyPot_Response_ResultSet makeRequest( $ips)

Make the actual lookup.
  • See: self::query()
  • See: Net_DNS2_Resolver::query()
  • Access: protected
  • Uses: self::$resolver
  • Uses: self::getHostForLooup()

Parameters:

array   $ips     

[ Top ]

parseResponse   [line 349]

Services_ProjectHoneyPot_Response_Result parseResponse( $respObj)

Parses the response object into a 'readable' format

For a more detailed response description, please see {@see Services_ProjectHoneyPot_Response::parse()}


Parameters:

object   $respObj     Whatever we received from the API.

[ Top ]

query   [line 222]

Services_ProjectHoneyPot_Response_ResultSet query( [string|array $ip = ''])

Checks if the supplied IP is listed.
  • See: self::__construct()
  • Todo: Check multiple if host has 1+ IPs.
  • Throws: Services_ProjectHoneyPot_Exception
  • Access: public
  • Uses: self::$resolver

Parameters:

string|array   $ip     IP or hostname. Using an IP is more "expensive" because we will need to resolve it.

[ Top ]

setAccesskey   [line 191]

string setAccesskey( string $accesskey)

Set the access key necessary to use this service.
  • See: self::__construct()
  • Access: public

Parameters:

string   $accesskey     Another accesskey.

[ Top ]

setDebug   [line 400]

$this setDebug( boolean $debug)

Enable debug on runtime.

Parameters:

boolean   $debug     To debug (true), or not to debug (false)?

[ Top ]

setDnsBlacklist   [line 204]

string setDnsBlacklist( string $server)

Sets another (than the default) server to query.
  • Access: public

Parameters:

string   $server     The DNS server to query.

[ Top ]

setHoneypot   [line 366]

null|string|array setHoneypot( [string|array $honeypot = null])

Sets an URL or an array of URLs to use for redirecting later on, if the IP is found 'guilty'. ;-)

Parameters:

string|array   $honeypot     Set a honeypot (string), or multiple.

[ Top ]

setResolver   [line 163]

$this setResolver( [ $resolver = null])

Set, or create a Net_DNS2_Resolver for internal use.
  • Throws: Services_ProjectHoneyPot_Exception In case of a wrong object or an error on init.
  • Access: public
  • Uses: self::$resolver

Parameters:

mixed   $resolver     'null' or Net_DNS_Resolver

[ Top ]

setResponseFormat   [line 177]

$this setResponseFormat( string $format)

Set the format to retrieve the info in.
  • Throws: Services_ProjectHoneyPot_Exception On unknown/unsupported format.
  • Access: public

Parameters:

string   $format     Either 'array' or 'object'.

[ Top ]


Documentation generated on Tue, 01 Nov 2011 17:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.