|
Feeds
- Downloads
- FAQ
- News
- Tutorials
|
|
|
View previous topic :: View next topic |
Author |
Message |
hicux webmaster
Joined: Apr 28, 2008 Posts: 13
|
Posted: Fri Oct 18, 2013 3:46 am Post subject: |
|
|
from nukeSpam.php updated with single quote and added backsticks.
Code: // Check Whitelist
if(strlen($u)==0)$wLu="NULL"; else $wLu = $u;
if(strlen($e)==0)$wLe="nobody@example.com"; else $wLe = $e;
$sql = 'select count(1) as count from ' . $prefix . '_spam_whitelist where wltype = "u" and wlvalue ="' . $wLu . '";';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $u = '';
$sql = 'select count(1) as count from ' . $prefix . '_spam_whitelist where wltype = "e" and wlvalue ="' . $wLe . '";';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $e = '';
$sql = 'select count(1) as count from ' . $prefix . '_spam_whitelist where wltype = "i" and wlvalue ="' . $ip . '";';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $ip = '';
|
Replace with
Code: // Check Whitelist
if(strlen($u)==0)$wLu='NULL'; else $wLu = $u;
if(strlen($e)==0)$wLe='nobody@example.com'; else $wLe = $e;
$sql = 'SELECT count(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = u AND `wlvalue` = \'' . $wLu . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $u = '';
$sql = 'SELECT count(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = e AND `wlvalue` = \'' . $wLe . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $e = '';
$sql = 'SELECT count(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = i AND `wlvalue` = \'' . $ip . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $ip = '';
|
Not: I wonder if I can add backstick here on this one. I guess not because it has a numeric.
count(1)
from updWL.php
Code:$columnPosition = intval($_POST['columnPosition']);
$update = '1=1';
if ($columnPosition == 0) $update = 'wltype = \'' . $value . '\'';
if ($columnPosition == 1) $update = 'wlvalue = \'' . $value . '\'';
$sql = 'UPDATE ' . $prefix . '_spam_whitelist SET ' . $update . ' WHERE wlid = \'' . $wlid . '\'';
$db->sql_query($sql);
echo $value;
?>
|
I replaced it with
Code:$columnPosition = intval($_POST['columnPosition']);
$update = '1=1';
if ($columnPosition == 0) $update = 'wltype = \'' . $value . '\'';
if ($columnPosition == 1) $update = 'wlvalue = \'' . $value . '\'';
$sql = 'UPDATE `' . $prefix . '_spam_whitelist` SET ' . $update . ' WHERE `wlid` = \'' . $wlid . '\'';
$db->sql_query($sql);
echo $value;
|
I think I just finished converting all files. Maybe I am missing some double quotes but after checking phpMyadmin and the site admin, I changed to another version of php in order to know if I get any error but fortunately everything is working properly and the module is working perfect.
Thanks for this amazing and necessary module.
Here I upload the whole module with all the changes
www.bestbuildpc.org/nukeSPAM.zip |
|
Back to top |
|
|
hicux
|
Posted: Tue Oct 29, 2013 7:08 am Post subject: |
|
|
hi kguske
I think I found a bug in admin/index.php
Code:Code: 1305 - Message: FUNCTI count does not exist
SQL was: SELECT `count` (1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = e AND `wlvalue` = 'afddds8989sf%40gmail.com';
|
If I go to phpMyadmin I don't see the column count.
Shouldn't this one
Code: // Create nukeSPAM whitelist table
$existSQL = 'SELECT 1 FROM `' . $prefix . '_spam_whitelist` LIMIT 0';
$createSQL = array();
$createSQL[] = 'CREATE TABLE `' . $prefix . '_spam_whitelist` (
`wlid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`wltype` CHAR( 1 ) NOT NULL ,
`wlvalue` VARCHAR( 255 ) NOT NULL ,
INDEX ( `wltype` , `wlvalue` )
) ENGINE=MyISAM;';
seoCheckCreateTable($existSQL, $createSQL);
|
Replace with this one?
Code: // Create nukeSPAM whitelist table
$existSQL = 'SELECT 1 FROM `' . $prefix . '_spam_whitelist` LIMIT 0';
$createSQL = array();
$createSQL[] = 'CREATE TABLE `' . $prefix . '_spam_whitelist` (
`wlid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`wltype` CHAR( 1 ) NOT NULL ,
`wlvalue` VARCHAR( 255 ) NOT NULL ,
`count` INT UNSIGNED NOT NULL ,
INDEX ( `wltype` , `wlvalue` )
) ENGINE=MyISAM;';
seoCheckCreateTable($existSQL, $createSQL);
|
I am gonna try it but let me know if I am correct. |
|
Back to top |
|
|
hicux
|
|
Back to top |
|
|
kguske Site Admin
Joined: May 12, 2005 Posts: 876
|
Posted: Tue Oct 29, 2013 11:56 am Post subject: |
|
|
Thanks, I'll take a look and compare it to my latest updates. _________________ |
|
Back to top |
|
|
hicux
|
Posted: Wed Oct 30, 2013 7:21 am Post subject: |
|
|
Hi kguske. I'm getting all the time this kind of error and I really don't know what is going on. Please let me know what is the final step.
Code:db/mysqli.php - Line: 201
Code: 1054 - Message: Unknown column 'u' in 'where clause'
SQL was: SELECT COUNT(1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = u AND `wlvalue` = 'gjeyolfh';
remote addr: 91.236.75.102
db/mysqli.php - Line: 201
Code: 1054 - Message: Unknown column 'e' in 'where clause'
SQL was: SELECT COUNT(1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = e AND `wlvalue` = 'babilonzjk%40hotmail.com';
remote addr: 91.236.75.102
db/mysqli.php - Line: 201
Code: 1054 - Message: Unknown column 'i' in 'where clause'
SQL was: SELECT COUNT(1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = i AND `wlvalue` = '91.236.75.102';
remote addr: 91.236.75.102
db/mysqli.php - Line: 201
Code: 1054 - Message: Unknown column 'u' in 'where clause'
SQL was: SELECT COUNT(1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = u AND `wlvalue` = 'Ememnfus';
|
I tried different ways to get this fix but unfortunately, warning error keeps alerting me
I tried this
Code: $sql = 'SELECT COUNT(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = u AND `wlvalue` = \'' . $wLu . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
|
Code:$sql = 'SELECT `count` (1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = u AND `wlvalue` = \'' . $wLu . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
|
None of them are working. There could be something wrong but I think u know better. |
|
Back to top |
|
|
kguske
|
Posted: Wed Oct 30, 2013 6:45 pm Post subject: |
|
|
You just need quotes around the u, e, and i
Code:SELECT COUNT(1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = 'u' AND `wlvalue` = 'gjeyolfh';
|
|
|
Back to top |
|
|
hicux
|
Posted: Thu Oct 31, 2013 2:22 pm Post subject: |
|
|
Really? I didn't know this!!!
I did this now and I think I am not getting anymore error. Thanks Guardian.
Code: // Check Whitelist
if(strlen($u)==0)$wLu='NULL'; else $wLu = $u;
if(strlen($e)==0)$wLe='nobody@example.com'; else $wLe = $e;
$sql = 'SELECT `count` (1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = `u` AND `wlvalue` = \'' . $wLu . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $u = '';
$sql = 'SELECT count (1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = `e` AND `wlvalue` = \'' . $wLe . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $e = '';
$sql = 'SELECT `count` (1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = `i` AND `wlvalue` = \'' . $ip . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $ip = '';
|
The package has been updated.
www.bestbuildpc.org/nukeSPAM.zip |
|
Back to top |
|
|
hicux
|
Posted: Thu Oct 31, 2013 3:47 pm Post subject: |
|
|
Guardian
I got the same error again. I didn't work.
Code:Code: 1305 - Message: FUNCTION mytable_2.count does not exist
SQL was: SELECT `count` (1) AS `count` FROM `nuke_spam_whitelist` WHERE `wltype` = `i` AND `wlvalue` = '192.187.123.242';
|
|
|
Back to top |
|
|
Guardian webmaster
Joined: Dec 25, 2005 Posts: 364 Location: Vsetin, Czech Republic
|
Posted: Thu Oct 31, 2013 8:32 pm Post subject: |
|
|
Is i a column name? If not it probably needs single quotes not back-ticks but am not familiar with this code so not sure what is being assigned to i_________________ Only registered users can see links on this board! Get registered or login! |
|
Back to top |
|
|
kguske
|
Posted: Fri Nov 01, 2013 6:19 am Post subject: |
|
|
It is a value |
|
Back to top |
|
|
hicux
|
Posted: Fri Nov 08, 2013 7:05 am Post subject: |
|
|
Sorry I didn't reply before.
Here I show you the fix. I am not getting anymore error after doing this.
Code: // Check Whitelist
if(strlen($u)==0)$wLu='NULL'; else $wLu = $u;
if(strlen($e)==0)$wLe='nobody@example.com'; else $wLe = $e;
$sql = 'SELECT COUNT(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = "u" AND `wlvalue` = \'' . $wLu . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $u = '';
$sql = 'SELECT COUNT(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = "e" AND `wlvalue` = \'' . $wLe . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $e = '';
$sql = 'SELECT COUNT(1) AS `count` FROM `' . $prefix . '_spam_whitelist` WHERE `wltype` = "i" AND `wlvalue` = \'' . $ip . '\';';
$wLthis = $db->sql_fetchrow($db->sql_query($sql));
if (intval($wLthis['count']) > 0) $ip = '';
|
|
|
Back to top |
|
|
hicux
|
Posted: Tue Dec 02, 2014 5:34 am Post subject: |
|
|
file nukeSPAMWL.php
rel= has been removed to get rid of validation error.
Code:<?php
/*
* nukeSPAM(tm)
*
* Copyright (c) 2012, Kevin Guske http://nukeSEO.com
*
* This program is free software. You can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, version 2 of the license.
*/
global $admin_file;
if(!isset($admin_file)) { $admin_file = 'admin'; }
if(!defined('ADMIN_FILE')) {
Header('Location: ../../../' . $admin_file . '.php');
die();
}
if (!defined('PHP_EOL')) define('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");
if (empty($check_username)) $check_username = '';
if (empty($check_email)) $check_email = '';
if (empty($check_ip)) $check_ip = '';
#$seo_config = seoGetConfigs('nukeSPAM');
OpenTable();
echo '<form id="formAddNewRow" action="#" style="width:800px;min-width:800px">' , PHP_EOL
, '<table border="0">' , PHP_EOL
, '<tr><td style="vertical-align:text-top;"><label for="wltype">Whitelist Type</label></td><td>' , PHP_EOL
, '<input type="hidden" name="id" id="id" value="DATAROWID" />' , PHP_EOL
, '<input type="hidden" name="unused" id="wltype" value="" />' , PHP_EOL
, '<input type="radio" name="wltype" id="wltypeu" value="u" class="required" /> <label for="wltypeu">' , _SPAM_USERNAME , '</label><br />' , PHP_EOL
, '<input type="radio" name="wltype" id="wltypee" value="e" /> <label for="wltypee">' , _SPAM_EMAIL , '</label><br />' , PHP_EOL
, '<input type="radio" name="wltype" id="wltypei" value="i" /> <label for="wltypei">' , _SPAM_IP ,'</label><br />' , PHP_EOL
, '<label for="wltype" class="error">Please select the Whitelist Type</label>' , PHP_EOL
, '</td></tr>' , PHP_EOL
, '<tr><td style="vertical-align:text-top;"><label for="wlvalue">Whitelist Value</label></td><td><input type="text" name="wlvalue" id="wlvalue" size="50" class="required" /><br />' , PHP_EOL
, '<label for="wlvalue" class="error">Please enter the Whitelist Value</label>' , PHP_EOL
, '</td></tr>' , PHP_EOL
, '</table>' , PHP_EOL
, '</form>' , PHP_EOL
, '<table cellpadding="0" cellspacing="0" border="0" class="display" id="nukeSPAMWL">' , PHP_EOL
, '<thead>' , PHP_EOL
, '<tr>' , PHP_EOL
, '<th>id</th>' , PHP_EOL
, '<th width="20%">' , _SPAM_WLTYPE , '</th>' , PHP_EOL
, '<th width="80%">' , _SPAM_WLVALUE , '</th>' , PHP_EOL
, '</tr>' , PHP_EOL
, '</thead>' , PHP_EOL
, '<tfoot>' , PHP_EOL
, '<tr>' , PHP_EOL
, '<th>id</th>' , PHP_EOL
, '<th>' , _SPAM_WLTYPE , '</th>' , PHP_EOL
, '<th>' , _SPAM_WLVALUE , '</th>' , PHP_EOL
, '</tr>' , PHP_EOL
, '</tfoot>' , PHP_EOL
, '<tbody>' , PHP_EOL
, '<tr>' , PHP_EOL
, '<td colspan="7" class="dataTables_empty">' , _SPAM_LOADING , '</td>' , PHP_EOL
, '</tr>' , PHP_EOL
, '</tbody>' , PHP_EOL
, '</table>' , PHP_EOL;
CloseTable();
|
|
|
Back to top |
|
|
oznuke Newbie
Joined: Nov 20, 2019 Posts: 2
|
Posted: Wed Nov 20, 2019 1:08 pm Post subject: Re: nukeSPAMâ„¢ update |
|
|
I have my old Ravennuke site up and running again. It uses 2.51.00
I am trying to install Nukespam but it does not show up in my modules list. I installed NukeSEO and the icon for it appears, although I have done nothing with it.
Nukespam does not show up in the list of modules I can activate/deactivate.
The Nukespam install instructions do not match up with my directory structure.
If I go to the modules folder, then to Your_Account, I do not have an includes folder in there, so no functions script.
Where am I going wrong? |
|
Back to top |
|
|
kguske
|
Posted: Thu Nov 21, 2019 11:49 pm Post subject: |
|
|
Strange. You can verify the installation of the module, which should enable the module administration. Check your database log and site error log for issues. When you go to the administration page (e.g. yoursite.com/admin.php?op=nukeSPAM) it should create the necessary tables and populate the configuration with a default. So after visiting that link (assuming it displays something), check for the creation of the appropriate database tables. |
|
Back to top |
|
|
oznuke
|
Posted: Fri Nov 22, 2019 12:12 pm Post subject: |
|
|
kguske wrote: | Strange. You can verify the installation of the module, which should enable the module administration. Check your database log and site error log for issues. When you go to the administration page (e.g. yoursite.com/admin.php?op=nukeSPAM) it should create the necessary tables and populate the configuration with a default. So after visiting that link (assuming it displays something), check for the creation of the appropriate database tables. |
I manually added a row to the table with the info. I can now get the icon to display but I still cannot find the correct PHP files to modify. As mentioned, I am just using Ravennuke 2.51.00 and the readme instructions reference files that are not part of my install. I have to be missing something. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|