Hello I have a question:
How do you make config files?
How would you make a program that when you run for the first time ask's for you to enter a new username and a new password and then it saves that to a config file.
Then when you start the Program up for a 2nd time it ask's you for the a username and the password attached to that username.
Could someone help me with this?
Thanks, AnthonyD98
[Question] How do you make config files?
Started by AnthonyD98™, Jan 29 2013 01:08 PM
2 replies to this topic
#1
Posted 29 January 2013 - 01:08 PM
#2
Posted 29 January 2013 - 01:29 PM
haha inspiration from anywhere?

a 'config' file is just a standard file. use fs.exists to see if its there, if not you can assume its first startup and ask for details and write to them to the file. when the file does exist read the file and proceed from there.
a 'config' file is just a standard file. use fs.exists to see if its there, if not you can assume its first startup and ask for details and write to them to the file. when the file does exist read the file and proceed from there.
#3
Posted 29 January 2013 - 01:56 PM
for passwords you should really just save the hashed version of the password instead of the password itself
prevents people from just reading the config file and typing in the password
prevents people from just reading the config file and typing in the password
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











