aboutsummaryrefslogtreecommitdiffstats
path: root/config/pf-blocker/pfblocker.php
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2011-10-27 10:40:22 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-10-27 10:40:22 -0200
commit24425031d548a8829dad98c125047ea7420a75ac (patch)
tree23baf48af08d1ae2c73fcafc0385708218ea86e5 /config/pf-blocker/pfblocker.php
parenta97659145f0d7b2573bfb9ad9adfd4dcac34ccfe (diff)
downloadpfsense-packages-24425031d548a8829dad98c125047ea7420a75ac.tar.gz
pfsense-packages-24425031d548a8829dad98c125047ea7420a75ac.tar.bz2
pfsense-packages-24425031d548a8829dad98c125047ea7420a75ac.zip
pfBlocker-dev - update files and dir references
Diffstat (limited to 'config/pf-blocker/pfblocker.php')
-rw-r--r--config/pf-blocker/pfblocker.php53
1 files changed, 25 insertions, 28 deletions
diff --git a/config/pf-blocker/pfblocker.php b/config/pf-blocker/pfblocker.php
index 5d0f825a..73d3d466 100644
--- a/config/pf-blocker/pfblocker.php
+++ b/config/pf-blocker/pfblocker.php
@@ -15,7 +15,7 @@ if ($_REQUEST['cbw']== 1){# and $_SERVER['REMOTE_ADDR']== '127.0.0.1'){
get_networks(2);
}
-function countryblock_get_countries(){
+function pfblocker_get_countries(){
$files= array ( "Africa" => "/usr/local/pkg/Africa_cidr.txt",
"Antartica" => "/usr/local/pkg/Antartica_cidr.txt",
"Asia" => "/usr/local/pkg/Asia_cidr.txt",
@@ -23,7 +23,7 @@ $files= array ( "Africa" => "/usr/local/pkg/Africa_cidr.txt",
"North America" => "/usr/local/pkg/North_America_cidr.txt",
"Oceania" => "/usr/local/pkg/Oceania_cidr.txt",
"South America"=>"/usr/local/pkg/South_America_cidr.txt");
-$cdir='/usr/local/pkg/countryblock';
+$cdir='/usr/local/pkg/pfblocker';
if (! is_dir($cdir))
mkdir ($cdir,0755);
foreach ($files as $cont => $file){
@@ -64,8 +64,8 @@ $xml= <<<EOF
/* \$Id$ */
/* ========================================================================== */
/*
- countryblock_{$cont_name}.xml
- part of the Countryblock package for pfSense
+ pfblocker_{$cont_name}.xml
+ part of the pfblocker package for pfSense
Copyright (C) 2011 Marcello Coutinho
All rights reserved.
*/
@@ -98,62 +98,59 @@ $xml= <<<EOF
<description>Describe your package here</description>
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
- <name>countryblock{$cont_name_lower}</name>
- <version>1.0.1</version>
- <title>Firewall: Countryblock</title>
- <include_file>/usr/local/pkg/countryblock.inc</include_file>
+ <name>pfblocker{$cont_name_lower}</name>
+ <version>1.0</version>
+ <title>Firewall: pfblocker</title>
+ <include_file>/usr/local/pkg/pfblocker.inc</include_file>
<menu>
- <name>Countryblock</name>
- <tooltiptext>Configure Countryblock</tooltiptext>
+ <name>pfBlocker</name>
+ <tooltiptext>Configure pfblocker</tooltiptext>
<section>Firewall</section>
- <url>pkg_edit.php?xml=countryblock.xml&amp;id=0</url>
+ <url>pkg_edit.php?xml=pfblocker.xml&amp;id=0</url>
</menu>
- <service>
- <name>countryblock</name>
- </service>
<tabs>
<tab>
<text>General</text>
- <url>/pkg_edit.php?xml=countryblock.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker.xml&amp;id=0</url>
</tab>
<tab>
<text>Africa</text>
- <url>/pkg_edit.php?xml=countryblock_Africa.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_Africa.xml&amp;id=0</url>
{$active['Africa']}
</tab>
<tab>
<text>Antartica</text>
- <url>/pkg_edit.php?xml=countryblock_Antartica.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_Antartica.xml&amp;id=0</url>
{$active['Antartica']}
</tab>
<tab>
<text>Asia</text>
- <url>/pkg_edit.php?xml=countryblock_Asia.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_Asia.xml&amp;id=0</url>
{$active['Asia']}
</tab>
<tab>
<text>Europe</text>
- <url>/pkg_edit.php?xml=countryblock_Europe.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_Europe.xml&amp;id=0</url>
{$active['Europe']}
</tab>
<tab>
<text>North America</text>
- <url>/pkg_edit.php?xml=countryblock_NorthAmerica.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_NorthAmerica.xml&amp;id=0</url>
{$active['North America']}
</tab>
<tab>
<text>Oceania</text>
- <url>/pkg_edit.php?xml=countryblock_Oceania.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_Oceania.xml&amp;id=0</url>
{$active['Oceania']}
</tab>
<tab>
<text>South America</text>
- <url>/pkg_edit.php?xml=countryblock_SouthAmerica.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_SouthAmerica.xml&amp;id=0</url>
{$active['South America']}
</tab>
<tab>
<text>XMLRPC Sync</text>
- <url>/pkg_edit.php?xml=countryblock_sync.xml&amp;id=0</url>
+ <url>/pkg_edit.php?xml=pfblocker_sync.xml&amp;id=0</url>
</tab>
</tabs>
<fields>
@@ -175,20 +172,20 @@ $xml= <<<EOF
<multiple/>
</field> </fields>
<custom_php_install_command>
- countryblock_php_install_command();
+ pfblocker_php_install_command();
</custom_php_install_command>
<custom_php_deinstall_command>
- countryblock_php_deinstall_command();
+ pfblocker_php_deinstall_command();
</custom_php_deinstall_command>
<custom_php_validation_command>
- countryblock_validate_input(\$_POST, &amp;\$input_errors);
+ pfblocker_validate_input(\$_POST, &amp;\$input_errors);
</custom_php_validation_command>
<custom_php_resync_config_command>
- sync_package_countryblock();
+ sync_package_pfblocker();
</custom_php_resync_config_command>
</packagegui>
EOF;
- file_put_contents('/usr/local/pkg/countryblock_'.$cont_name.'.xml',$xml,LOCK_EX);
+ file_put_contents('/usr/local/pkg/pfblocker_'.$cont_name.'.xml',$xml,LOCK_EX);
}