Results 1 to 8 of 8

Thread: It's crap.

  1. #1

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    It's crap.

    But i was messing and this happened... Notice the screen res...

    EDIT: And i am aware it's not encryption it is simply character replacement.
    Attached Images Attached Images  
    Zeegnahtuer?

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: It's crap.

    so.. what's crap?

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: It's crap.

    Did you deliberately write that to take up as many lines of code as possible? If so, good job
    I don't live here any more.

  4. #4

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: It's crap.

    Quote Originally Posted by wossname
    Did you deliberately write that to take up as many lines of code as possible? If so, good job
    Sorry, forget to mention my screen supports 1280x1024 max.

    Also, Wossy, can you suggest a better way? I'm a complete n00b when it comes to things like character replacement.
    Zeegnahtuer?

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: It's crap.

    Code:
    void Encypher(char* orig)
    {
            char* cypher = "QWERTYUIOPASDFGHJKLZXCVBNM";
            int len = 0;
            char* out = NULL;
            char* run = NULL;
            char temp = ' ';
    
            if(orig == NULL || orig[0] == '\0')
                    return;
    
            len = strlen(orig);
            run = out = (char*)malloc(len + 1);
    
            while(len--)
            {
                    temp = *orig++;
                    if(temp >= 'A' && temp <= 'Z')
                            temp = cypher[temp - 'A'];
    
                    *run++ = temp;
            }
    
            *run = '\0';
    
            printf("%s\n", out);
            free(out);
    }
    Last edited by wossname; Apr 30th, 2007 at 11:54 AM.
    I don't live here any more.

  6. #6
    Fanatic Member
    Join Date
    Dec 2002
    Location
    North Carolina
    Posts
    734

    Re: It's crap.

    Quote Originally Posted by wossname
    Code:
    void Encypher(char* orig)
    {
            char* cypher = "QWERTYUIOPASDFGHJKLZXCVBNM";
            int len = 0;
            char* out = NULL;
            char* run = NULL;
            char temp = ' ';
    
            if(orig == NULL || orig[0] == '\0')
                    return;
    
            len = strlen(orig);
            run = out = (char*)malloc(len + 1);
    
            while(len--)
            {
                    temp = *orig++;
                    if(temp >= 'A' && temp <= 'Z')
                            temp = cypher[temp - 'A'];
    
                    *run++ = temp;
            }
    
            *run = '\0';
    
            printf("%s\n", out);
            free(out);
    }
    I guess you deliberately wrote it in C to be completely unhelpful to him, as he is using VB, yet at the same time prove your point. Kudos to you, if he wanted real help he should've known better than to post in chit-chat.


    "X-mas is 24.Desember you English morons.." - NoteMe

  7. #7

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: It's crap.

    Quote Originally Posted by dsheller
    I guess you deliberately wrote it in C to be completely unhelpful to him, as he is using VB, yet at the same time prove your point. Kudos to you, if he wanted real help he should've known better than to post in chit-chat.
    Jokes on him, it actually helped me
    Zeegnahtuer?

  8. #8
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: It's crap.

    Full marks to dsheller.

    It's not completely unhelpful, you could print it out, fold it up and use it to prop up a wobbly table leg.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width