#!/usr/bin/env python #------------------------------------------------------------------- # # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # Version 2, December 2004 # #Copyright (C) 2004 Sam Hocevar # #Everyone is permitted to copy and distribute verbatim or modified #copies of this license document, and changing it is allowed as long #as the name is changed. # #DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE #TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION # #0. You just DO WHAT THE FUCK YOU WANT TO. # #This program is free software. It comes without any warranty, to #the extent permitted by applicable law. You can redistribute it #and/or modify it under the terms of the Do What The Fuck You Want #To Public License, Version 2, as published by Sam Hocevar. See #http://sam.zoy.org/wtfpl/COPYING for more details. # #-------------------------------------------------------------------- # #Made by !petKodiak. (Kodiak). You can find me on IRC at #/g/entoo on irc.rizon.net, or you can e-mail me at kodiak@lavabit.com #Please alert me to any bugs or things you think should be changed. #Thanks. # #Special thanks to Zanthas and Fetus # #-------------------------------------------------------------------- print """ mmmmm mm m m m # "# #"m # # # -----=|#mmm#" # #m # # #|=----- # # # # # # # # ## "mmmm" """ print 'Welcome to PNU!' username = raw_input('Input your desired username: ') print '' print 'Welcome ' +username +'!' password = raw_input('Input your desired password: ') def home(): cmd = raw_input('> ') if cmd == 'exit': exit() elif cmd == 'help': halp() elif cmd == 'chuser': chuser() elif cmd == 'chpass': chpass() elif cmd == 'man': man() else: print 'Command ' +cmd +' not recognized, please try again' home() def exit(): print '' print 'Thanks for playing with PNU!' def halp(): print '' print 'A list of commands:' print '' print 'exit = close PNU' print 'help = show this dialog' print 'chuser = change your username' print 'chpass = change your password' print 'man = show a detailed manual of a given command' print '' home() def chuser(): print '' passauthusername = raw_input('Enter your password: ') if passauthusername == password: username = raw_input('Enter your new desired username: ') print 'Your new username is ' +username home() else: print 'You do not have authorization to do that.' home() def chpass(): print '' passauthpassword = raw_input('Enter your current password: ') if passauthpassword == password: password = raw_input('Enter your new desired password: ') print 'Your new password is ' +password home() else: print 'You do not have authorization to do that.' home() def man(): print '' manpage = raw_input('What command do you want info on?: ') if manpage == 'exit': print '' print 'Exit is one of the basic commands of PNU, when you execute exit it stops PNU and returns you to the normal terminal window. Fun fact, it was the first command implemented.' print '' home() elif manpage == 'help': print '' print 'Help displays a quick and easy list of commands in case you are either new to PNU or have forgotten a command. It does not however explain the commands in great detail or tell you how to use them, this is why man exists. Help displays all the currently available commands, however it (and man, too) may not be immediately updated. Fun fact, help was the second command implemented and was inspired by the --help option available on most commands on Linux systems.' print '' home() elif manpage == 'chuser': print '' print 'Chuser is used to change the username of the person who executes the command. When you execute chuser, you will be asked for your password. You will then be asked for a new username, and henceforth it shall become thy nickname.' print '' home() elif manpage == 'chpass': print '' print 'This command is similar to chuser in the sense that it changes vital user account information. The password is used for authentication when performing important operations. When executing the command you will be asked for your current password (the one you have right now), and then for a new one. The new one will then become your password.' print '' home() elif manpage == 'man': print '' print 'Man is the command to view the manual for a given command. Man is obviously short for manual, and when you run the command you will be asked what manpage you wish to view. You type in the name of the command you wish to have in-depth information about, and then it will display it. Also, you\'re using it right now.' print '' home() else: print 'Sorry, there is no manpage for ' +manpage +'.' print '' print '' print 'Welcome to PNU. Type "help" for a list of commands.' home()