Magcro

welcome to our blog

We are Magcro

يتم التشغيل بواسطة Blogger.

Posts

Comments

The Team

Blog Journalist

Connect With Us

Join To Connect With Us

Portfolio

    Posted by: Elm0D Posted date: 12:26 م / comment : 2

    A simple example in Perl on how to perform the encryption Murcielago.




    # !usr/bin/perl
    # Cifrado Murcielago
    # Coded By Doddy Hackman in the year 2014

    head();
    menu();
    copyright();

    # Functions

    sub head {
        print "\n-- == Cifrado Murcielago == --\n";
    }

    sub copyright {
        print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
    }

    sub menu {
        print qq(
    ===============
    = Menu        =
    ===============
    1 - Cifrar    =
    2 - Descifrar =
    3 - Exit      =
    ===============
    );

        print "\n[+] Option : ";
        chomp( my $op = <stdin> );

        if ( $op eq "3" ) {
            copyright();
            <stdin>;
            exit(1);
        }

        print "\n[+] Enter text : ";
        chomp( my $text = <stdin> );

        print "\n[+] Result ...\n\n";

        if ( $op eq "1" ) {
            print cifrado_murcielago($text);
            <stdin>;
            menu();
        }
        elsif ( $op eq "2" ) {
            print descifrado_murcielago($text);
            <stdin>;
            menu();
        }
        else {
            menu();
        }

    }

    sub cifrado_murcielago {
        my $texto = shift;
        $texto =~ tr/murcielagoMURCIELAGO/01234567890123456789/;
        return $texto;
    }

    sub descifrado_murcielago {
        my $texto = shift;
        $texto =~ tr/01234567890123456789/murcielagoMURCIELAGO/;
        return $texto;
    }

    # The End ?



    That's all. 

    icon allbkg

    Tagged with:

    Next
    رسالة أحدث
    Previous
    رسالة أقدم

    2 for [Perl] Example Murcielago Encryption

Comments

The Visitors says