Small fixes.
This commit is contained in:
parent
13e7aaf090
commit
827853ffbd
|
@ -75,7 +75,7 @@ function reportExists($db, $name, $protocol, $port, $ip)
|
|||
'ip' => $ip
|
||||
]
|
||||
);
|
||||
if(!$stmt) { return -1; }
|
||||
if(!$stmt) { return false; }
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ function honeypot($name, $protocol, $port)
|
|||
|
||||
$report = reportExists($db, $name, $protocol, $port, $ip);
|
||||
|
||||
if($report != -1)
|
||||
if($report != false)
|
||||
{
|
||||
updateReport($db, $report);
|
||||
} else {
|
||||
|
@ -129,7 +129,7 @@ function serve()
|
|||
{
|
||||
$report = reportExists($db, $name, $protocol, $port, $ip);
|
||||
|
||||
if($report != -1)
|
||||
if($report != false)
|
||||
{
|
||||
updateReport($db, $report);
|
||||
} else {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CREATE TABLE `naughtylist` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`protocol` varchar(4) NOT NULL,
|
||||
`protocol` varchar(10) NOT NULL,
|
||||
`port` int(11) NOT NULL,
|
||||
`ip` varchar(20) NOT NULL,
|
||||
`count` int(11) NOT NULL,
|
||||
|
|
Loading…
Reference in New Issue
Block a user