<?php include_once(dirname(__FILE__)."/frame.class.inc"); include_once(dirname(__FILE__)."/class.unix.inc"); include_once(dirname(__FILE__)."/class.postfix.inc"); if(isset($_GET["NetworkManager-check-redhat"])){NetworkManager_redhat();exit;} if(isset($_GET["reconfigure-postfix-instances"])){postfix_reconfigures_multiples_instances();exit;} if(isset($_GET["ping"])){pinghost();exit;} if(isset($_GET["crossroads-restart"])){crossroads_restart();exit;} if(isset($_GET["ipv6"])){ipv6();exit;} if(isset($_GET["OpenVPNServerLogs"])){OpenVPN_ServerLogs();exit;} if(isset($_GET["ipdeny"])){ipdeny();exit;} if(isset($_GET["fw-inbound-rules"])){iptables_inbound();exit;} if(isset($_GET["fqdn"])){fqdn();exit;} if(isset($_GET["iptaccount-installed"])){iptaccount_check();exit;} while (list ($num, $ligne) = each ($_GET) ){$a[]="$num=$ligne";} writelogs_framework("unable to unserstand ".@implode("&",$a),__FUNCTION__,__FILE__,__LINE__); function NetworkManager_redhat(){ $unix=new unix(); $chkconfig=$unix->find_program("chkconfig"); if(!is_file($chkconfig)){return;} exec("$chkconfig --list NetworkManager 2>&1",$results); echo "<articadatascgi>". @implode("\n",$results)."</articadatascgi>";
exit; } if (isset($_GET["crossroads-restart"])) { crossroads_restart(); exit; } if (isset($_GET["ipv6"])) { ipv6(); exit; } if (isset($_GET["OpenVPNServerLogs"])) { OpenVPN_ServerLogs(); exit; } if (isset($_GET["ipdeny"])) { ipdeny(); exit; } if (isset($_GET["fw-inbound-rules"])) { iptables_inbound(); exit; } if (isset($_GET["fqdn"])) { fqdn(); exit; } if (isset($_GET["iptaccount-installed"])) { iptaccount_check(); exit; } if (isset($_GET["ifup-ifdown"])) {
include_once(dirname(__FILE__) . '/framework/frame.class.inc'); $sock=new sockets(); $GLOBALS["EnablePostfixAutoBlock"]=trim($sock->GET_INFO("EnablePostfixAutoBlock")); if($GLOBALS["EnablePostfixAutoBlock"]==null){$GLOBALS["EnablePostfixAutoBlock"]=0;} if($argv[1]=='--compile'){Compile_rules();die();} if($argv[1]=='--parse-queue'){parsequeue();die();} if($argv[1]=='--no-check'){$_GET["nocheck"]=true;} if($argv[1]=='--parse-sql'){ParseLastEvents();die();} if($argv[1]=='--delete-all-iptables'){DeleteAllIpTablesRules();die();} if($argv[1]=='--test-white'){$iptablesClass=new iptables_chains();$GLOBALS["IPTABLES_WHITELISTED"]=$iptablesClass->LoadWhiteLists();$iptablesClass->isWhiteListed($argv[2]);die();} if($argv[1]=='--export-drop'){ExportDrop();die();} if($argv[1]=='--transfert-white'){ParseResolvMX();die();} if($argv[1]=='--upgrade-white'){UpgradeWhiteList();die();} if($argv[1]=='--ipdeny'){ipdeny();die();} if($argv[1]=='--perso'){perso();die();} if($GLOBALS["VERBOSE"]){echo "Parsing ".@implode(" ", $argv)."\n";} if(!Build_pid_func(__FILE__,"MAIN")){writelogs(basename(__FILE__).":Already executed.. aborting the process",basename(__FILE__),__FILE__,__LINE__);die();} parsequeue(); if($GLOBALS["EnablePostfixAutoBlock"]<>1){events("This feature is currently disabled ({$GLOBALS["EnablePostfixAutoBlock"]})");die();} die(); //iptables -L OUTPUT --line-numbers //iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP; function DeleteAllIpTablesRules(){