Score:
74
Followers:
3

terminal locker for Unix made in C

This is script game fromt the book Unix System Security I took the scripts and edited it a little bit 

#include <stdio.h>
#include <signal.h>
 main ()
{
  char passbuf[10], *passwd, *getpass ();
  int sleepcount = 1;
  int validentry = 0;

  while ( ! validentry) {
    strcpy (passbuf, getpass ("Enter password: "));

    if ( strlen (passbuf) < 4)
      printf("Please enter at least four characters\n");
    else 
      validentry = 1;
    
  }
  signal(SIGINT, SIG_IGN);
  signal(SIGQUIT, SIG_IGN);
  printf("\n\n\n\n\n");
  printf("\t\t*************************************\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*          TERMINAL SECURED         *\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*                                   *\n");
  printf("\t\t*************************************\n");
  printf("\n\n\n\n\n");

  validentry = 0;

  while ( ! validentry){
    passwd = getpass ("Enter password: ");

    if (strcmp(passwd, passbuf) != 0){
      sleep(sleepcount);
      sleepcount *= 2;
      printf("Bad password, try again.\n");
    }
    else 
      validentry = 1, printf("Unlocked!\n");
  }

}

 



Login For More Features

So you can create and connect with what matters to you.

or
More From floppyfish118

Trending Posts

is it just me or does 2/3 of people use this plat… | March 28, 2024 | 129 views
why the **** is there posts about... special dolls | April 02, 2024 | 41 views
bruh | April 06, 2024 | 43 views
https://sentonoa.xyz/ It's out! I'm now self-hos… | March 25, 2024 | 88 views
Irix (i did something insane again) | March 23, 2024 | 82 views

Quick Settings


Top Users

Dheirya_Tyagi_CEO | 3706 Reputation
Trxp_Crzxp | 2454 Reputation
Bendy | 2090 Reputation
kz | 1906 Reputation
Eklavya_Tyagi | 1215 Reputation

Precipitation: %
Wind: mph
Weather data updates every 6 hours.

Categories

Not a category you like? Create one.

Sports | 18 followers | 6 posts

Talk about sports in this category!


Lifestyle | 18 followers | 13 posts

Talk about lifestyle in this category!


Political | 14 followers | 5 posts

Talk about political issues in this category!


Travel | 10 followers | 4 posts

Talk about travel in this category!


Fashion | 16 followers | 4 posts

Talk about fashion in this category!


Education | 15 followers | 23 posts

Talk about education in this category!


Music | 19 followers | 7 posts

Talk about music in this category!


News | 13 followers | 22 posts

Talk about news in this category!


Personal | 18 followers | 21 posts

Talk about personal topics in this category.


Not displaying all categories. See all categories.