🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #41485

Re: PASSWORD

#41485
From: Mika R Iisakkila
Date: Fri, 02 Feb 1990 09:14
31 lines
1374 bytes
Here's a piece of Turbo C code:

passwd.c:

	#include <stdio.h>
	#include <conio.h>
	#include <process.h>

	main(argc,argv)
	int argc;
	char **argv;
	{
	  char *s;
	  char *envp[1] = {NULL};
	  for(;;) {
	    s = getpass("Password : ");
	    if (!strcmp(s,"some_string")) {
	      if (execve(argv[1],argv+1,envp)) exit(0);
	    }
	  }
	}

, where 'some_string' is a password you'd like to use.
Compile this to passwd.exe and put a line 
'shell=c:\passwd.exe c:\command.com' in your config.sys.
After booting the computer will prompt for a password;
command.com won't be run unless the password is given correctly.

If your roommate is clever enough, he'll boot the computer from a
dos diskette, in which case passwd.exe won't be able to do anything...
Technical Details
Message-ID: <IISAKKIL.90Feb2111401@tko-sony-20.hut.fi>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!think!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!santra!iisakkil
References: <234.25C2B9DD@uscacm.UUCP> <-286529961@hpcupt1.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!think!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!santra!iisakkil
From: iisakkil@niksula.hut.fi (Mika R Iisakkila)
Newsgroups: comp.sys.ibm.pc
Subject: Re: PASSWORD
Message-ID: <IISAKKIL.90Feb2111401@tko-sony-20.hut.fi>
Date: 2 Feb 90 09:14:01 GMT
References: <234.25C2B9DD@uscacm.UUCP> <-286529961@hpcupt1.HP.COM>
Sender: news@santra.uucp (Cnews - USENET news system)
Organization: Helsinki University of Technology, Finland
Lines: 31
In-Reply-To: swh@hpcupt1.HP.COM's message of 30 Jan 90 15:58:58 GMT