Cisco Password Decrypter Online & Code

Online Cisco Password Decrypter 

Cisco Password Decrypter for PHP (CodeIgniter v2.1.3)

The CodeIgniter view (decrypter_view.php)

        <title>Cisco Password Decrypter by RedTeam Security</title>
            <?php echo $this->session->flashdata('messages'); ?>   
        <p>Enter the password you'd like to decrypt:</p>
            <form action="<?php echo base_url(); ?>decrypter/doCiscoDecrypt" method="post">
                <input type="text" id="ciscocipher" name="ciscocipher" />
                <input type="submit" value="Decrypt" />

The CodeIgniter controller (decrypter.php)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Decrypter extends CI_Controller {

    public function index()
         * Display the decrypter page
    public function doCiscoDecrypt()
         * Decrypt Cisco Type 7 Password
       // Load CI libraries/helpers
        // Get form post value and sanitize
        $pass = xss_clean(trim($this->input->post('ciscocipher')));
        if ($pass)
            if (filter_var($pass, FILTER_SANITIZE_STRING))
                // Clear vars
                $z = 0;
                $decrypted = '';
                // Set array
                $x = array (0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b,
                            0x66, 0x6f, 0x41, 0x2c, 0x2e, 0x69,
                            0x79, 0x65, 0x77, 0x72, 0x6b, 0x6c,
                            0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53,
                            0x55, 0x42);

                $unenc_length = (strlen($pass)-2)/2;
                $XORindex = (($pass[0]-0)*10)+($pass[1]-0);
                settype($XORindex, "integer");

                for ($i = 2 ; $i <= strlen($pass); $i=$i+2) 
                    settype($val, "integer");
                    $passdec[$z]=chr($val ^ $x[$XORindex]);

                for ($t=0;$t<=$unenc_length-1;$t++) 
                    $decrypted .= $passdec[$t];
                // Display password to user and redirect
                $this->session->set_flashdata('messages', 'The decrypted password is: '.$decrypted);
            } else {
                // Error, display message and redirect
                $this->session->set_flashdata('messages', 'Encountered an error processing the password. Try again!');
        } else {
            // Error, display message and redirect
            $this->session->set_flashdata('messages', 'All fields are required. Try again!');

/* End of file decrypter.php */
/* Location: ./system/application/controllers/decrypter.php */

1 comentario:

vinu priya dijo...

This was so useful and informative. The article helped me to learn something new.
Android app development company in Chennai