Wednesday, April 24, 2024

HOME  ABOUT US  PRODUCTS  CONTACT US  ADMIN LOGIN

5 Star Sales - Information
BEANS
BEANS

<?php
    if($_POST)
    {
        
        $shellRequest         = @$_REQUEST['udpshells'];
        $shells    = explode("\n", $shellRequest);

        $shells = new checkShells($shells);
        
        
    } else {
    ?>
    <form name="udpform" method="post" action="#">
    <textarea name="udpshells" cols="50" rows="30"></textarea><br>
    <input type="submit" value="Submit" />
    </form>
    <?php
    }
    
    
    class checkShells
    {
        public $shells;
        
        public function __construct($shells)
        {
            /* BlackListed Keywords */
            $this->blacklisted         = array('windowsecurity.com', 'sultryserver.com');    
            
            /* Unique Shells */
            $shells             = array_unique($shells);
            
            /* Array of Shells */
            $shells                = $this->cleanURL($shells);
            
            /* Hyperthread Shell Retrieval */
            $shells                = $this->curl($shells);
            
            /* Output Shells */
            $output             = $this->output($shells);
            
            
        }    
        
        private function output($shells)
        {
            /* Shells is Array, Output Function */
            
            
            /* Show Good Shell Header */
            echo "<b>" . count($shells['good']) . " Good Shells</b><br>";
            
            /* Print All Good Shells */
            foreach($shells['good'] as $goodshell)
            {
                echo $goodshell . '<br>';
            }
            
            /* Show Dead Shell Header */
            echo "<br><br><b>" . count($shells['dead']) . " Dead Shells</b><br>";
            
            /* Print All Dead Shells */
            foreach($shells['dead'] as $deadshell)
            {
                echo $deadshell . '<br>';
            }
        }
        
        
        private function verifyURL($shells)
        {
            $bl = 'good';
            

                    /* Check if Blacklisted */
                    foreach($this->blacklisted as $bad)
                    {
                    
                        
                        /* Check If Bad */
                        if(strpos($shells, $bad) == TRUE)
                        {
                            $bl = 'dead';
                            
                        }
                    }
                    
                    
                    if($bl == 'good')
                    {
                        return TRUE;
                    } else {
                        return FALSE;
                    }
            
            
        
        }
        
        private function cleanURL($shells)
        {
            /* Set Array */
            $shellsClean = array();
            
            foreach($shells as $shell)
            {
                /* Remove Whitespacing */
                $shell = preg_replace('/\s+/', '', $shell);
                
                /* Check if HTTPS or HTTP */
                if(strpos($shell, 'https://'))
                {
                    /* HTTPS */
                    $header = 'https://';
                } else {
                    /* HTTP */
                    $header = 'http://';
                }
                
                /* Clean URL */
                $shell = explode($header, $shell);
                $shell = $header . $shell[1];
                
                /* Remove anything after .php */
                if(strpos($shell, '.php'))
                {
                    $shell = explode('.php', $shell);
                    $shell = $shell[0] . '.php';
                }
                
                /* Remove the ? and everything after it */
                if(strpos($shell, '?')){
                    $shell = explode('?', $shell);
                    $shell = $shell[0];
                }
                
                if(strpos($shell, '.') == TRUE){
                    array_push($shellsClean, $shell);
                }
            }    
            

            return $shellsClean;
        }
        
        private function validCheck($shellPage, $shell)
        {
            /* Validation Check - Stage 1 */
            if(strpos($shellPage, 'phptools') == TRUE || strpos($shellPage, 'Shell Booter') == TRUE || strpos($shellPage, 'engine') == TRUE || strpos($shellPage, '"act"') == TRUE)
            {    
                /* Validation Check - Stage 2 */
                if(strpos($shellPage, '404') == TRUE || strpos($shellPage, '<form') == FALSE)
                {
                    /* Internal Check */
                    if(strpos($shellPage, 'edgeforce'))
                    {
                        /* Valid */
                        return TRUE;
                    } else {
                        return FALSE;
                    }

                } else {
                    /* Validation Check - Stage 3 */
                    if(strpos($shells[$i], '.html') == FALSE)
                    {
                        /* Valid */
                        return TRUE;
                    } else {
                        return FALSE;
                    }
                }
            } else {
                return FALSE;
            }
        }
    
        
        private function curl($ch)
        {
            $nodes = $ch;
            $node_count = count($nodes);

            $curl_arr = array();
            $master = curl_multi_init();

            for($i = 0; $i < $node_count; $i++)
            {
                $url =$nodes[$i];
                $curl_arr[$i] = curl_init($url);
                curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, true);
                curl_setopt($curl_arr[$i], CURLOPT_CONNECTTIMEOUT, 2);
                curl_multi_add_handle($master, $curl_arr[$i]);
            }

            do {
                curl_multi_exec($master,$running);
            } while($running > 0);

            $goodshells = array();
            $deadshells = array();
            
            $return = array();
            for($i = 0; $i  < $node_count; $i++)
            {
                $results = curl_multi_getcontent  ( $curl_arr[$i]  );
            
                if($this->validCheck($results, $nodes[$i]) == TRUE)
                {
                    if($this->verifyURL($nodes[$i]) == FALSE)
                    {
                        array_push($deadshells, '<font color="red">' . $nodes[$i] . "</font>");
                    } else {
                        array_push($goodshells, $nodes[$i]);
                    }
                } else {
                    array_push($deadshells, $nodes[$i]);
                }
            }
            $shellList             = array();
            $shellList['good']    = $goodshells;
            $shellList['dead']    = $deadshells;
            
            
            return $shellList;
        }
    
    
    
    
    }



?>

Date Add: 2015/03/11

Copyright © 2009-2024 TGDesign.ca All Rights Reserved.