a set of rules for OPNsense and PFsense firewalls
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
519 B

<?php
if (!isset( $_GET['combine'])) exit;
$date = new DateTime();
echo '; generated on: ' . $date->format('Y-m-d H:i:s'). "\n;\n";
$curdir = realpath('.');
// accept space, + and , as separators
$s = $_GET['combine'];
$s = str_replace('+', ',', $s);
$s = str_replace(' ', ',', $s);
$v = explode(',', $s);
foreach ($v as $item) {
if (strpos($item, '../') !== false) continue;
$fname = $curdir . '/' . $item . '.list.resolved';
if (!is_readable($fname)) continue;
echo '; ' . $item . "\n";
readfile($fname);
}