Subversion Repositories ALCASAR

Rev

Rev 3028 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3028 Rev 3099
Line 116... Line 116...
116
			}
116
			}
117
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
117
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
118
			fwrite ($pointeur, $line);
118
			fwrite ($pointeur, $line);
119
			fclose ($pointeur);
119
			fclose ($pointeur);
120
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
120
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
121
			sleep (1); # be sure that dnsmasq-blackhole is restarted before killing tun0 ! 
121
			sleep (1); # be sure that unbound-blackhole is restarted before killing tun0 ! 
122
			exec ("sudo /usr/bin/systemctl restart chilli");
122
			exec ("sudo /usr/bin/systemctl restart chilli");
123
			}
123
			}
124
		}
124
		}
125
	break;
125
	break;
126
	case 'change_uamdomain' :
126
	case 'change_uamdomain' :
Line 151... Line 151...
151
				}
151
				}
152
			}
152
			}
153
		fclose($pointeur);
153
		fclose($pointeur);
154
		}
154
		}
155
	exec ("sudo /usr/local/bin/alcasar-file-clean.sh");  # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
155
	exec ("sudo /usr/local/bin/alcasar-file-clean.sh");  # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
156
	sleep (1); # be sure that dnsmasq-blackhole is restarted before killing tun0 ! 
156
	sleep (1); # be sure that unbound-blackhole is restarted before killing tun0 ! 
157
	exec ("sudo /usr/bin/systemctl restart chilli");
157
	exec ("sudo /usr/bin/systemctl restart chilli");
158
	break;
158
	break;
159
	case 'new_ip' :
159
	case 'new_ip' :
160
		$ipAddr = trim($_POST['add_ip']);
160
		$ipAddr = trim($_POST['add_ip']);
161
		if (!preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/', $ipAddr)) {
161
		if (!preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/', $ipAddr)) {