Revision: 7245
          http://sourceforge.net/p/ipcop/svn/7245
Author:   owes
Date:     2014-02-19 21:25:14 +0000 (Wed, 19 Feb 2014)
Log Message:
-----------
Add dyndns for all-inkl.com

Modified Paths:
--------------
    ipcop/trunk/src/libs/ddns-lib.pl
    ipcop/trunk/src/scripts/setddns.pl
    ipcop/trunk/updates/2.1.2/ROOTFILES.i486-2.1.2

Modified: ipcop/trunk/src/libs/ddns-lib.pl
===================================================================
--- ipcop/trunk/src/libs/ddns-lib.pl    2014-02-19 13:26:23 UTC (rev 7244)
+++ ipcop/trunk/src/libs/ddns-lib.pl    2014-02-19 21:25:14 UTC (rev 7245)
@@ -13,10 +13,9 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with IPCop; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# along with IPCop.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Copyright (c) 2009-2010 The IPCop Team
+# Copyright (c) 2009-2014 The IPCop Team
 #
 # $Id$
 #
@@ -32,6 +31,8 @@
 $ddnsprefix =~ s/%/$General::noipprefix/;
 
 # Hash with all services we support and some specifics about them, which fiels 
are mandatory etc.
+$DDNS::va{'all-inkl.com'} =
+    {LOGIN => 1, HOSTNAME => 1, DOMAIN => 1, PASSWORD => 1, LBNAME => '', HELP 
=> ''};
 $DDNS::va{'cjb.net'} =
     {LOGIN => 1, HOSTNAME => 0, DOMAIN => 0, PASSWORD => 1, LBNAME => '', HELP 
=> ''};
 $DDNS::va{'dhs.org'} =

Modified: ipcop/trunk/src/scripts/setddns.pl
===================================================================
--- ipcop/trunk/src/scripts/setddns.pl  2014-02-19 13:26:23 UTC (rev 7244)
+++ ipcop/trunk/src/scripts/setddns.pl  2014-02-19 21:25:14 UTC (rev 7245)
@@ -13,10 +13,9 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with IPCop; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# along with IPCop.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Copyright (c) 2002-2010 The IPCop Team
+# Copyright (c) 2002-2014 The IPCop Team
 #
 # $Id$
 #
@@ -145,8 +144,45 @@
 
     my @service = split(/\./, "$settings{'SERVICE'}");
     $settings{'SERVICE'} = "$service[0]";
-    if ($settings{'SERVICE'} eq 'cjb') {
+    
+    if ($settings{'SERVICE'} eq 'all-inkl') {
+        if ($settings{'DOMAIN'} eq '') {
+            $settings{'HOSTDOMAIN'} = $settings{'HOSTNAME'};
+        }
+        else {
+            $settings{'HOSTDOMAIN'} = "$settings{'DOMAIN'}";
+        }
 
+        my ($out, $response) = Net::SSLeay::get_https(
+            "dyndns.kasserver.com",
+            443,
+            "/",
+            Net::SSLeay::make_headers(
+                'User-Agent'    => 'Ipcop',
+                'Authorization' => 'Basic ' . 
encode_base64("$settings{'LOGIN'}:$settings{'PASSWORD'}")
+            )
+        );
+
+        #Valid responses from service are:
+        # 'good' , 'nochg'  (ez-ipupdate like)
+        if ($response =~ m%HTTP/1\.. 200 OK%) {
+            if ($out =~ m/good|nochg/) {
+                &General::log("Dynamic DNS ip-update for the all-inkl domain 
$settings{'HOSTDOMAIN'} : success ($out)");
+                $success++;
+            }
+            else {
+                &General::log("Dynamic DNS ip-update for the all-inkl domain 
$settings{'HOSTDOMAIN'} : failure ($out)");
+            }
+        }
+        elsif ($out =~ m/<title>(.*)<\/title>/ig) {
+            &General::log("Dynamic DNS ip-update for the all-inkl domain 
$settings{'HOSTDOMAIN'} : failure ($1)");
+        }
+        else {
+            &General::log("Dynamic DNS ip-update for the all-inkl domain 
$settings{'HOSTDOMAIN'} : failure ($response)");
+        }
+    }
+    elsif ($settings{'SERVICE'} eq 'cjb') {
+
         my ($out, $response) = Net::SSLeay::get_http(
             'www.cjb.net', 80,
             
"/cgi-bin/dynip.cgi?username=$settings{'LOGIN'}&password=$settings{'PASSWORD'}&ip=$ip",

Modified: ipcop/trunk/updates/2.1.2/ROOTFILES.i486-2.1.2
===================================================================
--- ipcop/trunk/updates/2.1.2/ROOTFILES.i486-2.1.2      2014-02-19 13:26:23 UTC 
(rev 7244)
+++ ipcop/trunk/updates/2.1.2/ROOTFILES.i486-2.1.2      2014-02-19 21:25:14 UTC 
(rev 7245)
@@ -10,9 +10,11 @@
 /home/httpd/cgi-bin/services.cgi
 /home/httpd/cgi-bin/trafficadm.cgi
 /home/httpd/cgi-bin/wireless.cgi
+/usr/lib/ipcop/ddns-lib.pl
 /usr/local/bin/dhcpcd.sh
 /usr/local/bin/makesquidconf.pl
 /usr/local/bin/puzzleFwRules.pl
+/usr/local/bin/setddns.pl
 ##
 ## acpid-2.0.21
 /usr/sbin/acpid

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to