Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Programming Anyone?

  1. #21
    Poster
    Join Date
    May 2003
    Location
    North-east england UK
    Posts
    2,657
    Originally posted by haxor41789@22 April 2004 - 22:27
    Very few people here code.

    Here's a little "encryption" prog I just made BTW...
    Code:
    #include <stdio.h>
    #include <sys\stat.h>  // fucking slashes just HAVE to go the wrong way
    #include <sys\types.h>
    #include <fcntl.h>
    // #include <unistd.h> // dos doesn't use this shit
                            // uncomment all the includes below this if not dos
    #include <io.h>
    #include <string.h>
    #include <stdlib.h>
    #define DEBUG 0
    #define VERSION "1.0"
    int dc(char *opt,char *ifile,char *ofile,int rwsize,int keys,char *keystr);
    int main(int argc,char *argv[])
    {
       int status;
       int keys;
       printf("This is haxor41789's crappy little encryption program v%s.\n\n",VERSION);
       if(argc!=6)
       {
          printf("Usage: %s [e|d] infile outfile rwsize key-string\n",argv[0]);
          return -1;
       }
       keys=((strlen(argv[5])+1)/4);
       if(keys>5000)
       {
          printf("More than 5000 keys are unsupported in the DOS version... how surprising.\n");
          return -5;
       }
       if(DEBUG==1)
       {
          printf("Keys found: %i\n",keys);
       }
       if(atoi(argv[4])<2)
       {
          printf("Warning: rwsize too small, setting to minimum of 2 bytes.\n");
          strcpy(argv[4],"2");
       }
       else if(atoi(argv[4])>1024)
       {
          printf("rwsizes of greater than 1024 bytes are unsupported in the DOS version, setting to max of 1024.\n");
          strcpy(argv[4],"1024");
          printf("Attempting to encode %s with %i keys...\n",argv[2],keys);
          status=dc(argv[1],argv[2],argv[3],atoi(argv[4]),keys,argv[5]);
          if(status == 0)
          {
             printf("[%s] %s->%s [ok]\n",argv[1],argv[2],argv[3]);
             return 0;
          }
          else if(status==-2)
          {
             printf("Can't open infile %s.\n",argv[2]);
             return -2;
          }
          else if(status==-3)
          {
             printf("Can't open outfile %s.\n",argv[3]);
             return -3;
          }
          else
          {
             printf("Unknown error code, exiting.\n");
             return -4;
          }
    }
    int dc(char *opt,char *ifile,char *ofile,int rwsize,int keys,char *keystr)
    {
       char *keyptr;
       int k,x,i=1,fiptr,foptr;
       char indata[1024],outdata[1024];
       int key_array[5000],rrs=rwsize-1;
       unsigned char c;
       if(DEBUG==1)
       {
          printf("RRS: %i\n",rrs);
       }
       fiptr=_open(ifile,_O_RDONLY|_O_BINARY);
       if(fiptr==-1)
       {
          return -2;
       }
       foptr=_open(ofile,_O_CREAT|_O_WRONLY|_O_BINARY,_S_IWRITE);
       if(foptr==-1)
       {
          return -3;
       }
       keyptr=strtok(keystr,"-");
       for(k=0;k<keys;k++)
       {
          key_array[k]=atoi(keyptr);
          if(DEBUG==1)
          {
             printf("Assigning %i to key_array[%i]\n",key_array[k],k);
          }
          keyptr=strtok(NULL,"-");
       }
       k=0;
       while(i)
       {
          memset(indata,0,rwsize);
          memset(outdata,0,rwsize);
          i=_read(fiptr,indata,rrs);
          if(i==0)
          {
             break;
          }
          indata[i+1]='\0';
          if(DEBUG==1)
          {
             printf("Read %i bytes\n",i);
          }
          if(DEBUG==1)
          {
             printf("Indata: %s\n",indata);
          }
          for(x=0;x<i;x++)
          {
             c=indata[x];
             if(strncmp(opt,"e",1)==0)
             {
                if(k>keys-1)
                {
                   k=0;
                }
                if(DEBUG==1)
                {
                   printf("ENC(B): c=%i k=%i\n",c,k);
                }
                c+=key_array[k];
                if(DEBUG==1)
                {
                   printf("ENC(A): c=%i k=%i key_array[%i] = %i\n",c,k,k,key_array[k]);
                }
                k++; 
             }
             else if(strncmp(opt,"d",1)==0)
             { 
                if(k>keys-1)
                {
                   k=0;
                }
                if(DEBUG==1)
                {
                   printf("DEC(B): c=%i k=%i\n",c,k);
                }
                c-=key_array[k];
                if(DEBUG==1)
                {
                   printf("DEC(A): c=%i k=%i key_array[%i] = %i\n",c,k,k,key_array[k]);
                }
                k++;
             }
             outdata[x]=c;
             if(DEBUG==1)
             {
                printf("Outdata: %s\n",outdata);
             }
          }
          _write(foptr,outdata,i);
       }
       _close(fiptr);
       _close(foptr);
       return 0;
    }
    i can pick out the odd line of code but overall i have no idea what that does

  2. Everything Related to the Board   -   #22
    h1
    Guest
    That's where I found it.

    The stamp on my end is March 2001, and I was an admitted fucking plagarist back then.

    People who know me know I fucking hate plagarists, I don't do it anymore now that I know how much work it is.

    BTW BOT... you're stealing my bandwidth and I think that image was posted here.

  3. Everything Related to the Board   -   #23
    shn's Avatar Ð3ƒμ|\|(7
    Join Date
    May 2003
    Posts
    3,568
    Originally posted by [B
    [O][T],22 April 2004 - 16:34]Or did You just copy the code from here or here btw look @ the date 11/1/98

    Fancy explain?

    EDIT: pwned

    BOT
    haxor has to deal with his disappointment. So why don't you be a good sport and leave the pic that you ripped from his site on your post?

    Why do you always edit your post when you don't want to look normal like the rest of us?
    And how much do YOU know about programming bot?
    I doubt your in any place to look any higher than the former.

  4. Everything Related to the Board   -   #24
    Out of The Ordinary
    Join Date
    Feb 2003
    Posts
    3,927
    I didnt know He was hosting the pic, when He said He was hosting it, I removed the pic.
    Also You have no idea how often I edit My own posts, I add the legend when I edit other members posts (very rare according to Admin CP), but didnt care to add it when I was testing the word filter in one of haxor's advertising posts, becouse I didnt change anything in His post. I just clicked edit and submit 1 second later. What harm can that do?

    And sorry I dont have any interest in programming

    BOT

  5. Everything Related to the Board   -   #25
    ur right dude, not that many programmers here (guessing). i aint a pro at it myself, i would consider myself as an intermediate (is that how u spell it??lol...i'm half asleep). i was thinking, how comes there are so many programmers in the world, that the market is saturated, when everyone i know hates programming (except for one guy). maybe everyone is doing plagarism!! i have to admit everyone steals a bit of code from somewhere. as long as u understand the damn thing its ok. in my university one of my mates just copied the whole programming project worth(30%) from some dude...well he's gonna f*** up on the exam..lol.

    ....back to the revision...
    I always tell the truth. Even when I lie.

  6. Everything Related to the Board   -   #26
    h1
    Guest
    BOT... the word filter still isn't working.

    And there's really no way you can block it.

    If you add hex into the URLs (%hex value), there are 1.333735776850284124449081472843780*10^33 possible values for klitetools dot com, 6.6009724686219550843768321818372*10^82 vales for ktechsupport.clicdev.com, 1.048576*10^30 values for 203.22.204.86, and 2.4356848165022712132477606520105*10^91 values for the secret URL.

    That's just hex. It goes on forever.

  7. Everything Related to the Board   -   #27
    SeK612's Avatar Poster BT Rep: +10BT Rep +10
    Join Date
    Nov 2002
    Location
    UK
    Posts
    718
    The word filters are just there as a deterrent. You can get around them by doing stuff like placing spaces between the words are there to encourage people not to do things (in this case spam). I'm sure the admins / mods will sort out any posts which people try to get around the filters.

  8. Everything Related to the Board   -   #28
    h1
    Guest
    It's not spam though. It's now illegal to post a DDL to a freeware program, or to the homepage of the new client, or to point people to a page which just happens to have all of the security-related tools they need...

    Etc.

  9. Everything Related to the Board   -   #29
    Out of The Ordinary
    Join Date
    Feb 2003
    Posts
    3,927
    Haxor, thanks for the information, but if You think We will do anything to block Your site in the word filter You're wrong. For Us it's all ok now
    And I've to agree with SeK612

    BOT

  10. Everything Related to the Board   -   #30
    brotherdoobie's Avatar Long live Hissyfit BT Rep: +1
    Join Date
    Jan 2003
    Location
    Next To Automated Alice
    Posts
    10,374
    Originally posted by Error403@22 April 2004 - 01:53
    The real coding is in c, and c++ IMO.
    Nah, assembler all the way
    Small is beautiful

    Peace brotherdoobie

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

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