summaryrefslogtreecommitdiff
path: root/includes/utils.php
AgeCommit message (Collapse)Author
2017-01-03Copyright updated to 2017.Guillaume Mazoyer
2016-06-13Fix hostname_to_ip_address.Guillaume Mazoyer
Get only AAAA or A record based on the router config if provided.
2016-06-12Add new configuration options to enable/disable IPv6 or IPv4.Guillaume Mazoyer
When disabling IPv6 or IPv4, the looking glass will not try to use both IP protocol versions when looking for an AS routes or when pinging or tracerouting. If an IP address of a disabling IP version is used, the user will have an error in return of its command. This error will tell him that the IP version he is trying to use is disabled. Please note that when trying to ping or traceroute a hostname from a Cisco or a Juniper device, this looking glass will not prevent the device to use a disabled IP version when executing its command. This commit also contains some small changes with HTML tags.
2016-05-20Everybody wants IPv6 first right?Guillaume Mazoyer
2016-02-18Reject AS path regex containing ; and ".Guillaume Mazoyer
An AS path regex will be considered as invalid if any of the ; and " characters are used. These characters could be used to inject arbitrary command due to the router command line interpretation. This is a temporary fix for issue #13 while waiting for something better.
2015-11-08Fix derp, typo.Guillaume Mazoyer
2015-11-08Fix derp. AAA is not a valid DNS record type.Guillaume Mazoyer
2015-11-08Ensure hostname is not an IP address.Guillaume Mazoyer
2015-07-23Rework hostname parameter check.Guillaume Mazoyer
Rename FQDN to hostname which seems more appropriate. Refactor match_fqdn / match_hostname function to use a more accurate way of checking a potential hostname.
2014-11-17Code format. Always use () for functions.Guillaume Mazoyer
2014-09-24Log format can be configured.Guillaume Mazoyer
The format for each log can be configured with the configuration option defined by $config['logs']['format']. %D is for the time, %R is for the requester IP address, %H is for the host on which the command has been executed and %C is for the command. Warning! The configuration option to choose the logs file has been moved from $config['misc']['logs'] to $config['logs']['file'].
2014-09-03Add config to disallow the use of private and reserved IP ranges.Guillaume Mazoyer
2014-08-06Start some functions documentation.Guillaume Mazoyer
2014-08-06Add ping/traceroute for FQDN on BIRD and Quagga.Guillaume Mazoyer
Basically this can work with all Linux boxes. It gets A and AAAA records from DNS and decide if it can uses IPv6 or IPv4 to ping or to traceroute. IPv6 is always preferred of course.
2014-08-05Add config.defaults.php to set default configuration options.Guillaume Mazoyer
The defaults can be overriden in the config.php file but some of them are fine as defaults. This will help in having a config.php file as short as we can. Also move utils.php to the includes directory.