Project

General

Profile

Download (1.63 KB) Statistics
| Branch: | Tag: | Revision:
1 cb7d18d5 Renato Botelho
#!/usr/local/bin/php-cgi -f
2 41196b69 Ermal LUÇI
<?php
3
/*
4 ac24dc24 Renato Botelho
 * rc.captiveportal_configure_mac
5
 *
6
 * part of pfSense (https://www.pfsense.org)
7 38809d47 Renato Botelho do Couto
 * Copyright (c) 2015-2016 Electric Sheep Fencing
8 8f585441 Luiz Souza
 * Copyright (c) 2015-2021 Rubicon Communications, LLC (Netgate)
9 ac24dc24 Renato Botelho
 * All rights reserved.
10
 *
11 b12ea3fb Renato Botelho
 * Licensed under the Apache License, Version 2.0 (the "License");
12
 * you may not use this file except in compliance with the License.
13
 * You may obtain a copy of the License at
14 ac24dc24 Renato Botelho
 *
15 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
16 ac24dc24 Renato Botelho
 *
17 b12ea3fb Renato Botelho
 * Unless required by applicable law or agreed to in writing, software
18
 * distributed under the License is distributed on an "AS IS" BASIS,
19
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
 * See the License for the specific language governing permissions and
21
 * limitations under the License.
22 ac24dc24 Renato Botelho
 */
23 41196b69 Ermal LUÇI
24 c81ef6e2 Phil Davis
require_once("config.inc");
25
require_once("functions.inc");
26 41196b69 Ermal LUÇI
require_once("filter.inc");
27 c81ef6e2 Phil Davis
require_once("shaper.inc");
28
require_once("captiveportal.inc");
29 41196b69 Ermal LUÇI
30
global $cpzone;
31
32
$cpzone = isset($_GET['cpzone']) ? $_GET['cpzone'] : trim($argv[1]);
33
$startidx = isset($_GET['startidx']) ? $_GET['startidx'] : trim($argv[2]);
34
$stopidx = isset($_GET['cpzone']) ? $_GET['stopidx'] : trim($argv[3]);
35
36
$cpzoneidx = $config['captiveportal'][$cpzone]['zoneid'];
37
$filename = "{$g['tmp_path']}/{$cpzoneidx}_mac_{$startidx}_{$stopidx}";
38
39 6c07db48 Phil Davis
//log_error("STARTED: " . time() . " - {$cpzone} : $startidx : {$stopidx} : {$cpzoneidx} : {$filename}");
40 41196b69 Ermal LUÇI
captiveportal_passthrumac_configure($filename, $startidx, $stopidx);
41
//log_error("STOPPED: " .time() . " - {$cpzone} : $startidx : {$stopidx} : {$cpzoneidx} : {$filename}");
42
43 517b893e Renato Botelho
mwexec("/sbin/ipfw -q {$filename}");
44 41196b69 Ermal LUÇI
@unlink($filename);
45
?>