Thread: Obfuscated CODE

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    6

    Obfuscated CODE

    Hello, Is there anyone could explain the obfuscated code to me? I know it's a nested for loop. I wanna know what is n and what is
    Code:
    putchar(!d+++33^ l&1);
    The original code is here:
    Code:
    main(l,a,n,d)
    char**a;
    {
    
    for(d=atoi(a[1])/10*80-atoi(a[2])/5-596;n="@NKA\
    CLCCGZAAQBEAADAFaISADJABBA^\
    SNLGAQABDAXIMBAACTBATAHDBAN\
    ZcEMMCCCCAAhEIJFAEAAABAfHJE\
    TBdFLDAANEfDNBPHdBcBBBEA_AL\
     H E L L 0,    W O R L D! "
       [l++-3];)
    
    for(;n-->64;)
       
       
          putchar(!d+++33^ l&1);
    
    }

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    you need the line "%82j_=='; before main

    Quote Originally Posted by chinux
    Hello, Is there anyone could explain the obfuscated code to me? I know it's a nested for loop. I wanna know what is n and what is
    Code:
    putchar(!d+++33^ l&1);
    The original code is here:
    Code:
    main(l,a,n,d)
    char**a;
    {
    
    for(d=atoi(a[1])/10*80-atoi(a[2])/5-596;n="@NKA\
    CLCCGZAAQBEAADAFaISADJABBA^\
    SNLGAQABDAXIMBAACTBATAHDBAN\
    ZcEMMCCCCAAhEIJFAEAAABAfHJE\
    TBdFLDAANEfDNBPHdBcBBBEA_AL\
     H E L L 0,    W O R L D! "
       [l++-3];)
    
    for(;n-->64;)
       
       
          putchar(!d+++33^ l&1);
    
    }

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    6

    Hi

    could you explain why?
    what do you mean by %82_==j
    Sorry that I am new to C programming

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > Sorry that I am new to C programming
    Well put down the obfuscated code entries for the next 5 years and get good at learning proper C.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  2. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 07:23 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM