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

Class: Services_ProjectHoneyPot

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

Class Overview


A class to interface services provided by ProjectHoneyPot.org


Author(s):

Version:

  • Release: 0.5.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

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


[ Top ]


Class Variables

$accesskey =

[line 87]


Type:   string


[ Top ]

$debug =  false

[line 107]


Type:   bool


[ Top ]

$dns_blacklist =  'dnsbl.httpbl.org'

[line 93]


Type:   string


[ Top ]

$honeypot =

[line 114]


Type:   string


[ Top ]

$resolver =

[line 100]


Type:   object


[ Top ]

$responseFormat =  'array'

[line 119]

  • Var: Return an array or an object in the end?
  • Access: protected

Type:   string


[ Top ]



Method Detail

factory   [line 142]

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

Initialize the class.

Parameters:

string   $accesskey   —  The accesskey provided by Project HoneyPot.
bool   $debug   —  Enable debug, or maybe not? :-)

[ Top ]

getHoneyPot   [line 332]

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 276]

string getHostForLookup( string $ip)

Builds the host to query.

Parameters:

string   $ip   —  The IP which needs to be resolved.

[ Top ]

parseResponse   [line 298]

array|Services_ProjectHoneyPot_Response_Result parseResponse( object $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 221]

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

Checks if the supplied IP is listed.
  • See: Services_ProjectHoneyPot::factory
  • Todo: Check multiple if host has 1+ IPs.
  • Throws: Services_ProjectHoneyPot_Exception
  • Access: public
  • Uses: Services_ProjectHoneyPot::$resolver
  • Uses: Services_ProjectHoneyPot::parseResponse
  • Uses: Services_ProjectHoneyPot::getHostForLookup

Parameters:

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

[ Top ]

setAccesskey   [line 188]

string setAccesskey( string $accesskey)

Set the access key necessary to use this service.
  • See: Services_ProjectHoneyPot::factory
  • Access: public

Parameters:

string   $accesskey   —  Another accesskey.

[ Top ]

setDebug   [line 348]

boolean setDebug( boolean $debug)

Enable debug on runtime.

Parameters:

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

[ Top ]

setDnsBlacklist   [line 201]

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 315]

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 ]

setResponseFormat   [line 169]

string 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 Mon, 11 Mar 2019 15:17:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.