Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
$_F=__FILE__;$_X='P1hHP2EgYXs0Kip7TSpNQEpRVWFMVXVuPEphUjx7TSpNe00qTWh1UmFhYnVNRGRSd3dNZlV1..
Decoded Output download
?><?php
/**
* @StopForumSpam
*
* Wrapper class for stopforumspam.com API. Uses json internally.
*
* @author Armin Rosu
* @copyright 2011, Armin Rosu
* @license http://www.opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
* @link http://www.stopforumspam.com/usage API Reference
* @version 0.1
*/
class StopSpam
{
/**
* The API key.
*
* @var string
*/
private $api_key;
private $check_level;
/**
* The base url, for tha API/
*
* @var string
*/
private $endpoint = 'http://api.stopforumspam.org/';
/**
* Constructor.
*
* @param string $api_key Your API Key, optional (unless adding to database).
*/
public function __construct( $api_key = null, $check_level = 1 ) {
// store variables
$this->api_key = $api_key;
$this->check_level = intval($check_level);
}
/**
* Add to the database
*
* @param array $args associative array containing email, ip, username and optionally, evidence
* e.g. $args = array('email' => '[email protected]', 'ip_addr' => '8.8.8.8', 'username' => 'Spammer?', 'evidence' => 'My favourite website http://www.example.com' );
* @return boolean Was the update succesfull or not.
*/
public function add( $args )
{
// should check first if not already in database
// add api key
$args['api_key'] = $this->api_key;
// url to poll
$url = 'http://www.stopforumspam.com/add.php?'.http_build_query($args, '', '&');
// execute
$response = file_get_contents($url);
return (false == $response ? false : true);
}
/**
* Get record from spammers database.
*
* @param array $args associative array containing either one (or all) of these: username / email / ip.
* e.g. $args = array('email' => '[email protected]', 'ip' => '8.8.8.8', 'username' => 'Spammer?' );
* @return object Response.
*/
public function get( $args )
{
// should check first if not already in database
// url to poll
$url = $this->endpoint.'api?'.http_build_query($args, '', '&').'&json';
//
return $this->poll_json( $url );
}
/**
* Check if either details correspond to a known spammer. Checking for username is discouraged.
*
* @param array $args associative array containing either one (or all) of these: username / email / ip
* e.g. $args = array('email' => '[email protected]', 'ip' => '8.8.8.8', 'username' => 'Spammer?' );
* @return boolean
*/
public function is_spammer( $args )
{
// poll database
$record = $this->get( $args );
if( $record === false ) return false;
// give the benefit of the doubt
$spammer = false;
// parse database record
foreach( $record as $datapoint )
{
// not 'success' datapoint AND spammer
if ( isset($datapoint->appears) && $datapoint->appears )
{
if( isset($datapoint->confidence) && $this->check_level > 1 ) {
$datapoint->confidence = intval($datapoint->confidence);
if ( $this->check_level == 2 AND $datapoint->confidence > 40 ) { $spammer = true; }
if ( $this->check_level == 3 AND $datapoint->confidence > 80 ) { $spammer = true; }
} else {
$spammer = true;
}
}
}
return $spammer;
}
/**
* Get json and decode. Currently used for polling the database, but hoping for future
* json response support, when adding.
*
* @param string $url The url to get
* @return object Response.
*/
protected static function poll_json( $url )
{
$data = false;
if( function_exists( 'curl_init' ) ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
@curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt( $ch, CURLOPT_HEADER, 0);
$data = curl_exec( $ch );
curl_close( $ch );
if( $data !== false ) return json_decode($data);
}
if( preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen')) ) {
$data = @file_get_contents( $url );
if( $data !== false ) return json_decode($data);
}
return false;
}
}
Did this file decode correctly?
Original Code
$_F=__FILE__;$_X='P1hHP2EgYXs0Kip7TSpNQEpRVWFMVXVuPEphUjx7TSpNe00qTWh1UmFhYnVNRGRSd3dNZlV1TXdRVWFmVXVuPHdhUjx5RFU8TQpPS3lNfXdid01Id1UuTT4uUWJ1LlJkZEN5e00qe00qTUBSblEgVXVNCnU8Pi5NQVV3bntNKk1ARFVhQ3U+eCBRTUJ6ZWUsTQp1PD4uTUFVd257TSpNQGQ+RGIud2JNIFFRYTo0NFBQUHlVYWIud1VudURieVV1eDRkPkRiLnd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F9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCc8TwpiS11KRW89fWgyd2RhWlgwans4R1tMWVRJUzZDMWZCL1ZBLnY0bmxjIEhRaXhGbU1lUHF5dGtwTkRVOVJyNTNzN3U+Z1d6JywnbVBBZUlKU0tFTFVXa3NscDc+NUIKUTx2RlhHTllkeTZmMkRUUm59L3VxTWhqdD1nel0gMXd4Lltae1Zjb2JhSDkzOE9yaTRDMCcpOyRfUj1zdHJfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));
Function Calls
strtr | 1 |
strrev | 1 |
str_replace | 1 |
base64_decode | 2 |
Stats
MD5 | 8d52e162c82bdaabd331091fd21c7244 |
Eval Count | 2 |
Decode Time | 78 ms |