[TAC] Any Spam API

[TAC] Any Spam API 1.0.9

No permission to download
Code:
Error Info
ErrorException: Only variables should be passed by reference - library/Tac/AnyApi/Model/AnyApi.php:570
Generated By: Unknown Account,

Noticed these showing up after update.
 
@Volion
What version of php are you using

That line of code is:
$emaildomain = array_pop(explode('%40', $email));

I might have to separate that into two lines (strange I didn't see a warning with my versions of PHP)
 
@Volion
What version of php are you using

That line of code is:
$emaildomain = array_pop(explode('%40', $email));

I might have to separate that into two lines (strange I didn't see a warning with my versions of PHP)

5.5.8 -upgrading to .10, thanks much.
 
Last edited:
How does the disposable email check work? Does it query the API with every single registration email address?
Currently we have about 3,000 registrations per month. Most of those are with the common email addresses like gmail.com, googlemail.com, yahoo.co.uk, yahoo.com, virginmedia.com, btinternet.com, hotmail.com, outlook.com etc.
If we could set up a whitelist of the most common email domains, then we wouldn't have to do the disposable email check lookup anywhere near as much.
Is this possible?
 
Hmm, that would be a nice enhancement

I'm still thinking about it
So for this scenario, we need a set of bypass rules...

I have to make it so that the rules are general and can be applied to all APIs (since any API can be added /configured)
So, to the Logic area I could add:

Bypass Rules

Bypass if
{$username} = ,,,
{$ip} = ,,,
{$email} = ,,,
{$emaildomain} = ,,,

Where the commas represent a list of values, hence you could then add
{$emaildomain} = homtail.com, hotmail.co.uk, google.com, yahoo.com, virginmedia.com, btinternet.com, outlook.com

I don't want to hard code anything, or make exceptions for one API... the idea is that any API can be added and configured in AnyApi, so using a Bypass Rules set (rules with the values that already exist within the logic) we have a more flexible system.
 
Hmm, that would be a nice enhancement

I'm still thinking about it
So for this scenario, we need a set of bypass rules...

I have to make it so that the rules are general and can be applied to all APIs (since any API can be added /configured)
So, to the Logic area I could add:

Bypass Rules

Bypass if
{$username} = ,,,
{$ip} = ,,,
{$email} = ,,,
{$emaildomain} = ,,,

Where the commas represent a list of values, hence you could then add
{$emaildomain} = homtail.com, hotmail.co.uk, google.com, yahoo.com, virginmedia.com, btinternet.com, outlook.com

I don't want to hard code anything, or make exceptions for one API... the idea is that any API can be added and configured in AnyApi, so using a Bypass Rules set (rules with the values that already exist within the logic) we have a more flexible system.
Totally agree that programmatically, it's best to make the system as generic as possible. $email and $email domain can be handled together if you allow wildcards.
I think the key, though, is to make the system faster (and in the case of disposable emails from a paid service, cheaper) by doing less api calls.
 
Hmm, that would be a nice enhancement

I'm still thinking about it
So for this scenario, we need a set of bypass rules...

I have to make it so that the rules are general and can be applied to all APIs (since any API can be added /configured)
So, to the Logic area I could add:

Bypass Rules

Bypass if
{$username} = ,,,
{$ip} = ,,,
{$email} = ,,,
{$emaildomain} = ,,,

Where the commas represent a list of values, hence you could then add
{$emaildomain} = homtail.com, hotmail.co.uk, google.com, yahoo.com, virginmedia.com, btinternet.com, outlook.com

I don't want to hard code anything, or make exceptions for one API... the idea is that any API can be added and configured in AnyApi, so using a Bypass Rules set (rules with the values that already exist within the logic) we have a more flexible system.

Anymore thought on this? Would be nice to stop hitting the api for all the major mail providers.
 
Well, having had a quick look at this, it's pretty much already there as functionality since the there is a response cache
(The number of days the API response is held in a local cache)

Since the API will only be checked once per url request (for x days)

Hotmail.com will only be checked once per x days, since the response will be held in the cache:
http://check.block-disposable-email.com/easyapi/json/xxxxxx/hotmail.com => {"request_status":"success","domain_status":"ok","version":"0.1","servertime":"2014-04-28 18:07:54","server_id":"mirror6_amsterdam"}

So even if you had 3000 users all registering via hotmail.com in the last 14 days, if your response cache is set to 14, the API will only be checked once in that 14 days

White listing 10 - 20 email addresses in this scenario is only going to reduce the number of requests by 20 -40.

However, you could increase your cache size to significantly reduce the number of requests further (both + and -responses are cached)

What are your stats like when you visit this page:
http://www.block-disposable-email.com/cms/manage/your-personal-dea-statistics/
 
Last edited:
Getting an occasional error:
Undefined variable: foundSpamAnyApi Yesterday at 5:33 AM - library/Tac/FoolBotHoneyPot/Model/Log.php:335

ErrorException: Undefined variable: foundSpamAnyApi - library/Tac/FoolBotHoneyPot/Model/Log.php:335
Generated By: Unknown Account, Yesterday at 5:33 AM
Stack Trace
#0 /home/sites/avforums/public_html/library/Tac/FoolBotHoneyPot/Model/Log.php(335): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/sites/avf...', 335, Array)
#1 /home/sites/avforums/public_html/library/Tac/FoolBotHoneyPot/ControllerPublic/Register.php(643): Tac_FoolBotHoneyPot_Model_Log->logBot(Object(XenForo_Options), Array, false, '}??O', false, Array, 'donghaee', 'donghaee@yopmai...', 39, 1, false, false, false, Array)
#2 /home/sites/avforums/public_html/library/UserEss/ControllerPublic/Register.php(68): Tac_FoolBotHoneyPot_ControllerPublic_Register->actionRegister()
#3 /home/sites/avforums/public_html/library/XenForo/FrontController.php(347): UserEss_ControllerPublic_Register->actionRegister()
#4 /home/sites/avforums/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/sites/avforums/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
["url"] => string(79) "http://www.avforums.com/register/register?6e55e5384155f39345=2099d5384155f2b473"
["_GET"] => array(2) {
["/register/register"] => string(0) ""
["6e55e5384155f39345"] => string(18) "2099d5384155f2b473"
}
["_POST"] => array(44) {
["d4ea55384155f42f24"] => string(0) ""
["75b8c5384155f3e922"] => string(0) ""
["username"] => string(18) "abaf1b4e8d0e34afa3"
["1a5645384155f2c7e7"] => string(0) ""
["d708b5384155f3d596"] => string(0) ""
["d84625384155f3b654"] => string(0) ""
["5c3cf5384155f30e53"] => string(8) "donghaee"
["1a4165384155f4330b"] => string(0) ""
["c01df5384155f34cdf"] => string(0) ""
["a3dee5384155f3be3c"] => string(0) ""
["a56635384155f436f3"] => string(0) ""
["7c3865384155f2eb18"] => string(0) ""
["email"] => string(42) "x@819978f0-0b0f-11e2-892e-0800200c9a66.com"
["c8cfc5384155f2d3c2"] => string(0) ""
["f95805384155f33586"] => string(0) ""
["6d8bd5384155f2cfda"] => string(0) ""
["e26895384155f3a2c8"] => string(0) ""
["206925384155f2b82b"] => string(20) "donghaee@yopmail.com"
["a8d375384155f38f40"] => string(0) ""
["2fa3f5384155f39b0d"] => string(0) ""
["401225384155f358a6"] => string(8) "Random13"
["454ee5384155f3683c"] => string(8) "Random13"
["9ad0a5384155f38395"] => string(0) ""
["73ae25384155f3aaad"] => string(0) ""
["ac9635384155f3e15c"] => string(0) ""
["0f3d45384155f3972a"] => string(0) ""
["password"] => string(8) "********"
["password_confirm"] => string(8) "********"
["dob_month"] => string(1) "1"
["dob_day"] => string(2) "12"
["dob_year"] => string(4) "1990"
["gender"] => string(4) "male"
["12e5e5384155f2d7a3"] => string(0) ""
["8a25d5384155f34125"] => string(0) ""
["170435384155f3e537"] => string(0) ""
["703c65384155f32d99"] => string(6) "female"
["15ef85384155f3450e"] => string(14) "Pacific/Midway"
["5d3585384155f4236e"] => string(14) "Pacific/Midway"
["f8d935384155f30a71"] => string(12) "Asia/Bangkok"
["timezone"] => string(14) "Pacific/Midway"
["51d785384155f37fa6"] => string(14) "Pacific/Midway"
["agree"] => string(1) "1"
["_xfToken"] => string(8) "********"
["reg_key"] => string(32) "7d6e03545855de5b1210e6b6dd5647d3"
}
}
This was the last rejected registration email domain.
 
Bug in FBHP (from a recent tidy up),
It was happening only when user was not detected as a bot by fbhp, but was detected as spam via api (so not a common scenario, and hadn't run into it during tests)

Fixed in FoolBotHoneyPot_v2_4_03b
 
i have been getting some strange errors in the error log:

Code:
ErrorException: Undefined offset: 3 - library/Tac/AnyApi/Model/AnyApi.php:613
Generated By: Unknown Account, Yesterday at 8:06 AM
Stack Trace

#0 /home/unkn0wn/public_html/forums/library/Tac/AnyApi/Model/AnyApi.php(613): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/unkn0wn/p...', 613, Array)
#1 /home/unkn0wn/public_html/forums/library/Tac/AnyApi/Model/AnyApi.php(591): Tac_AnyApi_Model_AnyApi->reverseOctet('2001:5b0:24ff:e...')
#2 /home/unkn0wn/public_html/forums/library/Tac/AnyApi/Model/AnyApi.php(30): Tac_AnyApi_Model_AnyApi->apiRequestString('kasthorn777', 'kasthorn%40yaho...', 'http://www.fspa...', 'FSpamlist', 'a0f3b10881dd')
#3 /home/unkn0wn/public_html/forums/library/Tac/FoolBotHoneyPot/ControllerPublic/Register.php(847): Tac_AnyApi_Model_AnyApi->isAnyApiBot('kasthorn777', 'kasthorn@yahoo....', Object(XenForo_Input), 'api_2', Array)
#4 /home/unkn0wn/public_html/forums/library/Tac/FoolBotHoneyPot/ControllerPublic/Register.php(570): Tac_FoolBotHoneyPot_ControllerPublic_Register->aaMethods(Object(XenForo_Options), Array, Object(Milano_SmileyManager_DataWriter_User), false, Array, true, false, false)
#5 /home/unkn0wn/public_html/forums/library/Nobita/AccountDetection/XenForo/ControllerPublic/Register.php(11): Tac_FoolBotHoneyPot_ControllerPublic_Register->actionRegister()
#6 /home/unkn0wn/public_html/forums/library/Tac/StopCountrySpam/ControllerPublic/Register.php(337): Nobita_AccountDetection_XenForo_ControllerPublic_Register->actionRegister()
#7 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(347): Tac_StopCountrySpam_ControllerPublic_Register->actionRegister()
#8 /home/unkn0wn/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/unkn0wn/public_html/forums/index.php(13): XenForo_FrontController->run()
#10 {main}

Request State

array(3) {
  ["url"] => string(87) "http://portalcentric.net/forums/register/register?fbd1753af3b275c7d6=2e38453af3b275d35f"
  ["_GET"] => array(1) {
    ["fbd1753af3b275c7d6"] => string(18) "2e38453af3b275d35f"
  }
  ["_POST"] => array(46) {
    ["fdc9a53af3b275c214"] => string(0) ""
    ["5ce7253af3b275bf84"] => string(0) ""
    ["f434b53af3b275d0f1"] => string(0) ""
    ["8350853af3b275c54a"] => string(0) ""
    ["6936753af3b275c6e4"] => string(11) "kasthorn777"
    ["6e3eb53af3b275cf38"] => string(0) ""
    ["6139053af3b275c4be"] => string(0) ""
    ["username"] => string(18) "abaf1b4e8d0e34afa3"
    ["b04c453af3b275c3ec"] => string(0) ""
    ["0226753af3b275c9e2"] => string(0) ""
    ["a1dd753af3b275c191"] => string(0) ""
    ["8f05d53af3b275c795"] => string(0) ""
    ["email"] => string(42) "x@819978f0-0b0f-11e2-892e-0800200c9a66.com"
    ["b803c53af3b275cea2"] => string(0) ""
    ["633f353af3b275c0cc"] => string(0) ""
    ["c037753af3b275d48d"] => string(0) ""
    ["3217853af3b275c753"] => string(0) ""
    ["08c1b53af3b275d3f4"] => string(18) "kasthorn@yahoo.com"
    ["c1a4d53af3b275bf29"] => string(0) ""
    ["ba39453af3b275d2cb"] => string(0) ""
    ["password"] => string(8) "********"
    ["password_confirm"] => string(8) "********"
    ["e23ed53af3b275bfc6"] => string(8) "person69"
    ["d115f53af3b275cf80"] => string(8) "person69"
    ["0c5a653af3b275d5a7"] => string(0) ""
    ["bb01953af3b275c6a1"] => string(0) ""
    ["c005753af3b275ca24"] => string(0) ""
    ["8427153af3b275c327"] => string(0) ""
    ["dob_month"] => string(1) "7"
    ["dob_day"] => string(1) "7"
    ["dob_year"] => string(4) "1995"
    ["868fa53af3b275c08b"] => string(0) ""
    ["9f28253af3b275d5e9"] => string(0) ""
    ["gender"] => string(4) "male"
    ["6504753af3b275c65b"] => string(0) ""
    ["396cc53af3b275ceeb"] => string(4) "male"
    ["8e0c353af3b275c505"] => string(16) "America/New_York"
    ["8618a53af3b275c594"] => string(14) "Pacific/Midway"
    ["28b2b53af3b275ce0c"] => string(14) "Pacific/Midway"
    ["timezone"] => string(14) "Pacific/Midway"
    ["324a953af3b275c008"] => string(14) "Pacific/Midway"
    ["public_uuid"] => string(25) "4f7105e8f2c053af3c2496fcb"
    ["custom_img_captcha_response_field"] => string(5) "Spoon"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["reg_key"] => string(32) "ff4a956b3907cc654324075f796b7699"
  }
}
 
well i no longer use any api..

the xenforo integrated anti-spam Messieurs work just fine.. once all configured.. i still use a few from the collection but not all..
 
@tenants
A bug exists. With this installed and the "don't check API if captcha denied" used with Xenforo's new Recaptcha, captcha will always deny user!!

Email and Username checking is also totally broken
 
Top Bottom