Disable LEAD export from Public IP

General and Support topics relating to ViciDialNow and GoAutoDial ISO installers

Moderators: enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, s0lid

Disable LEAD export from Public IP

Postby gmcust3 » Mon Feb 25, 2013 5:16 am

How to Disable LEAD export from Public IP ??
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Mon Feb 25, 2013 10:40 am

Which version of GoAutoCE did you install with? There are two versions available: CE 2.0 and CE 2.1.

list_download.php

Modify this file and place an if/else statement in the php code where the final download statement is and check to see if the IP is local before allowing the actual download to begin. :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Disable LEAD export from Public IP

Postby gmcust3 » Mon Feb 25, 2013 10:43 am

Any Code Help ? :roll:
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Mon Feb 25, 2013 1:09 pm

Sure. Find the final export and post it and I'll generate an if statement for you :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Disable LEAD export from Public IP

Postby gmcust3 » Wed Feb 27, 2013 1:46 am

Code: Select all
function ip_is_private($ip)
{
        $pri_addrs = array(
                          '10.0.0.0|10.255.255.255',
                          '172.16.0.0|172.31.255.255',
                          '192.168.0.0|192.168.255.255',
                          '169.254.0.0|169.254.255.255',
                          '127.0.0.0|127.255.255.255'
                         );

        $long_ip = ip2long($ip);
        if($long_ip != -1) {

            foreach($pri_addrs AS $pri_addr)
            {
                list($start, $end) = explode('|', $pri_addr);

                 // IF IS PRIVATE
                 if($long_ip >= ip2long($start) && $long_ip <= ip2long($end))
                 return (TRUE);
            }
    }

return (FALSE);
}


Code: Select all
if ( ip_is_private ( $ip_address1 ) )
{
    printf ( "%s is from a private address range\n", $ip_address1 );
}
else
{
    printf ( "%s is *NOT* from a private address range\n", $ip_address1 );
}



Above code will help ???
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Wed Feb 27, 2013 11:37 am

Excellent. Now we just need the location to use the function and we're on! :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Disable LEAD export from Public IP

Postby gmcust3 » Thu Feb 28, 2013 2:56 am

Code: Select all
if ($lists_allowed < 1)
      {
      echo "You are not allowed to download this list: $list_id\n";
      exit;
      }


I see there are so many like these... Need to Put below lines just below above codes ?

Code: Select all

if ( ip_is_private IS NOT ( $ip_address1 ) )
{
   echo "You are not allowed to download this list: $list_id\n";
   exit;
}

GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Thu Feb 28, 2013 10:14 am

In that case, you could find where "$lists_allowed" is defined, and add another method to make lists_allowed = 0. Then the lists allowed check above will work for you and you're done.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Disable LEAD export from Public IP

Postby gmcust3 » Wed Mar 13, 2013 2:36 am

I see two entries :

if ($lists_allowed < 1)
and
$lists_allowed =$row[0];
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Wed Mar 13, 2013 1:44 pm

instead of $lists_allowed =$row[0]; change it to $lists_allowed =0;

that will disable ALL ips. you'll need to modify it to detect local ips to allow them (or perhaps a specific IP and allow that one).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Disable LEAD export from Public IP

Postby gmcust3 » Thu Mar 14, 2013 1:30 am

:)

Back to square , How to "you'll need to modify it to detect local ips to allow them" ?
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Re: Disable LEAD export from Public IP

Postby williamconley » Thu Mar 14, 2013 7:59 am

well that would depend on your local ip definition. look up the php code to grab the ip of the user, and compare the first X digits to a string with your local subnet on it ... if they match, leave this code alone. if they do not, however, force the lists allowed to "0".
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20256
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to ViciDialNow - GoAutoDial

Who is online

Users browsing this forum: Google [Bot] and 73 guests