}
// Run the SQL and check if we have one line
- runCrackerTrackerSql(sprintf("UPDATE `ctracker_data` SET `%s`=`%s`+1 WHERE (`remote_addr`='%s' AND `proxy_addr`=' . ') LIMIT 1",
+ runCrackerTrackerSql(sprintf("UPDATE `ctracker_data` SET `%s`=`%s`+1 WHERE (`remote_addr`='%s' AND `proxy_addr`='%s') LIMIT 1",
$countColumn,
$countColumn,
crackerTrackerEscapeString($rowData['remote_addr']),
// Aquire database link
aquireCrackerTrackerDatabaseLink();
- // By default no proxy is used
- $proxyUsed = 'N';
-
- // Did the attacker use a proxy?
- if (isCrackerTrackerProxyUsed()) {
- // Set it
- $proxyUsed = 'Y';
- }
-
// Prepare array for database insert
$rowData = [
'remote_addr' => determineCrackerTrackerRealRemoteAddress(),
'script_name' => crackerTrackerScriptName(),
'referer' => crackerTrackerReferer(),
'request_method' => crackerTrackerRequestMethod(),
- 'proxy_used' => $proxyUsed,
- 'first_attempt' => 'NOW()'
+ 'proxy_used' => (isCrackerTrackerProxyUsed() ? 'Y' : 'N'),
+ 'first_attempt' => 'NOW()',
];
// Insert the array in database