pf::useragent
pf::useragent is the module for User-Agent data management for both nodes and violations enforcement.
Initialize database prepared statements
Returns true if node_useragent record exists undef or 0 otherwise.
Is a MAC considered mobile based on its User-Agent
Return values: undef if we have no information on the browser. true if it's a mobile false otherwise
View a single useragent trigger
View a single useragent trigger
View all useragent triggers
View all useragent triggers
Add a useragent trigger along with it's metadata
Lookup the trigger ID for a given browser property
Initializes the User-Agent data structure. It's two things, one fast lookup hash for trigger ids:
browser property => trigger id
and one array of hashes with everything:
( id => trigger id property => browser property description => property description )
Be _really_ careful modifying this method so that the trigger IDs will stay the same! We don't want our users to keep updating their conf/violations.conf file to track changing trigger IDs.
Updates the node_useragent information according to User-Agent string and fires appropriate violation triggers based on User-Agent properties.
Inverse inc. <info@inverse.ca>
Copyright (C) 2005-2015 Inverse inc.
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; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.