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