Victory Road Archive

You are viewing an archive of Victory Road.

Victory Road closed on January 8, 2018. Thank you for making us a part of your lives since 2006! Please read this thread for details if you missed it.

Technology → Obfuscated C/C++ ASCII Art Pyrmaid

Page 1 of 1

1. SpaceMan++ said on September 30, 2008, 10:46:03 PM (-07:00)

Zoroark
288 posts

Here's an obfuscated C/C++ code.

Code:
                 /*------------------------------------------------*\
                / Obfuscated C/C++ ASCII Art Pyrmaid -               \
                \ An obfuscated C/C++ source code ASCII art pyrmaid  /
                 \*------------------------------------------------*/

                                      #include\
                                      <iostream>
                                      #include  \
                                        <stdio.h>
                                      int   main
                                      (int i=1 )
                                        { int
                                         _ =
                                          i
                                         //\ .
                                        ////\ .
                                       // |  \ .
                                      / i |i//\ .
                                     / i  | i//\ .
                                    /1-  1   ///\ .
                                   / 2-  121   //\ .
                                  / 3-  12321   //\ .
                                 / 4-  1234321   //\ .
                                / 5-  1234-4321   //\ .
                               / 6-  12345-54321   //\ .
                              / 7-  123456-654321   //\ .
                             / 8-  1234567-7654321   //\ .
                            / 9- 123456789-987654321  //\ .
                           / (1+1||1+1==2)?(101):(010) //\ .
                          / (10+1||2+2==4)?( 1 ):(1010) //\ .
                         / (100+1||3+3==6)?(101):(01010) //\ .
                        / (100+1||4||4==8)?(1||1):(10101) //\ .
                       / (1000+1||5||5==0)?(2||2):(010101) //\ .
                      / (1000+11||6||6==2)?(3||3):(1010101) //\ .
                     / (10000+1||7||7==14)?(44-44):(1010101) //\ .
                    / (10000+11||8||8==16)?(55-55):(01010101) //\ .
                   / (100000+11||9||9==18)?(66-66):(101010101) //\ .
                  / (100000+11||10|10==20)?(77-77):(0101010101)-//\ .
                 //----------||----------------------------------//\ .
               _/2;   int x=1|1 ; int y  = 0;  ;   int  z  =   2- //\ .
              _/1 ;  int xx=1|1; int yy = 01    ;    int zz =    1+//\ .
              //------------||----------------------------------------\ .
            _/12- 1 + (x++) |   1    + i||i +    1    + (++x) + 1  - //\ .
           _/11-x-2 + (x++) |   1   + 10||01 +   1    | (++x) + 2-x - //\ .
          _/10-x-3  + (x)  ||  01   + 07||70 +   10   ||  (x) +  3-x - //\ .
         _/9- x- 4 +  (x)  ||  01   + 06||60 +   10   ||  (x)  + 4 -x - //\ .
        _/8- x- 5  +  (x)  ||  10   + 05||50 +   01   ||  (x)  +  5 -x - //\ .
       _/7- x-  6 +  (x)  ||   10  +  04||40  +  01    ||  (x)  + 6  -x - //\ .
      _/6- x-  7  +  (x)  ||  01   +  03||30  +   10   ||  (x)  +  7  -x - //\ .
     _/5- x-   8 +   (x)  ||  01   +  02||20  +   10   ||  (x)   + 8   -x - //\ .
    _/4- x-   9  + (x++) ||   10   +   _||_   +   01    || (++x) +  9   -x - //\ .
   _/3- x-  10  +  (x++) ||   10  +   i-88-i   +  01    || (++x)  +  01  -x - //\ .
  _/2- x-   11  +  (x++) ||   1   +   i-88-i   +   1    || (++x)  +  11   -x - //\ .
 _/1- x-   12   +  (x++) |    1   +   i-88-i   +   1     | (++x)  +   21   -x;  //\ .
/*_____*/printf("%i \n",/*--*/yy/*---*/+xx+/*---*/zz+/*---\-*/x+y+z+_+i/*_*/);}////\ .

2. Yoshi648 said on October 1, 2008, 02:02:02 PM (-07:00)

Administrator
3,147 posts

Yay random pyramid

3. SpaceMan++ said on October 1, 2008, 05:40:51 PM (-07:00)

Zoroark
288 posts

Here's my new one:

Code:
#include <stdlib.h>   //"The huge 7" - An obfuscated version //
#include <iostream>  //of SpaceMan's Prime Number Generator //
bool isPrime(int integer) {for (int i = 2; i < integer; i++ )
{if (integer % i == 0){return false;break;}}return (true); }
int main(int argc, char** argv){std::cout << "Prime Number "
                                             << "Generator"
                                            << " 1.0\nThis"
                                           <<  " program "
                                          <<    "outputs"
                                         << " all prime"
                                        <<   " numbers"
                                       <<" lower than"
                                      <<" certain va"
                                     <<"lue. If you "
                                    << "entered inv"
                                   <<"alid value, "
                                  <<"the program "
                                 <<"may be buggy"
                                << ". \nEnter 0"
                               <<" or 1 to exi"
                              <<"t.\n";restart
                             :std:: cout << "E"
                            <<"nter the start"
                           <<"ing point: \n"
                          <<">" ; unsigned
                         long int start=3;
                        std:: cin>>start;
                       std::cout <<"\n";
                      std:: cout << "E"
                     <<"nter the max."
                    <<" limit: \n>";
                   unsigned long int
                  limit;std::cin >>
                 limit;std::cout<<
                "\n";if(limit<=1)
               {std::cout << "Ex"
              << "it.\n"; return
             (EXIT_SUCCESS);}if
            (start>0xFFFFFFFF)
           { start=0xFFFFFFFF
          -1;} if ( limit  >
         0xFFFFFFFF) {limit
        =0xFFFFFFFF-1;}if(
       start%2==0) {start
      ++;}for(long double
     current=start;current
    < limit;current += 2)
   {if (isPrime(current)
  ){ std::cout<<current
 <<"\n";}}goto restart;
return(EXIT_FAILURE);}
It's a huge 7

4. Cat333Pokémon said on October 2, 2008, 04:29:13 PM (-07:00)

Administrator
10,307 posts

The best part is the fact that those are real programs!

5. Blues said on October 2, 2008, 04:41:22 PM (-07:00)

Regigigas
867 posts

Is that a coincidence, or did you somehow arrange that?

6. Cat333Pokémon said on October 2, 2008, 07:22:10 PM (-07:00)

Administrator
10,307 posts

Quote:
Originally Posted by blueheat127
Is that a coincidence, or did you somehow arrange that?
They were arranged. Line breaks aren't necessary in C. You can put them almost anywhere in a line as long as you mark it properly.

Page 1 of 1

User List - Contact - Privacy Statement - Lycanroc.Net