Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [HELP!] username and password program
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
uberwalla




PostPosted: Thu Aug 17, 2006 4:10 pm   Post subject: [HELP!] username and password program

Hey, i was wondering if it is at all possible to have a gui textfeild and a login button that work together to do the following:
1)Your able to write down in it a username and password
2) the password when typed comes up as "****"
3)when u click logon, it searchs through matching usernames and passwords in the source code and if they match the ones in the textfeild it goes and starts a game or something depending on the username/password

If this is possible could someone plz help me create one, or do it for me Very Happy

thx
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Thu Aug 17, 2006 4:54 pm   Post subject: (No subject)

Yes, it's entirely possible. Why wouldn't it be possible?

You can use Turing's built-in GUI, or you could make your own.

I'd recommend making your own. It's a good exercise; it's an even better exercise if you do it using OOP.

For example source code, you can see how I did this very problem.
uberwalla




PostPosted: Thu Aug 17, 2006 5:56 pm   Post subject: reply

Thx For the help there. but i know its possible and i have done it, but i want it so i dont have to have any extra files other then the source code. that way... when im done creating and adding the usernames and passwords in the code i can create an exe and discard the code so no1 can hack in after looking at what the passwords are.
Cervantes




PostPosted: Thu Aug 17, 2006 6:35 pm   Post subject: (No subject)

Having code spread over multiple files is a good thing, provided you don't abuse it to the point where you spread what would be a very small program across several files with no useful benefit.

When you create an .exe, it pulls in the source code from the required files. So you could include or import another turing file into your make program, make an .exe, and send the exe without any turing code, and it would run.

What's more, even if you change the code of the included or imported file, the .exe will not have changed at all. It no longer has any connection to that source code, because that source code was compiled along with the main code.
uberwalla




PostPosted: Fri Aug 18, 2006 12:03 am   Post subject: reply

i know about that.

what i mean about no extra files is like... the buffer stuff.
(the includes[.tu])

because even if u have the exe u need them to be able to run the exe. i know u dont need the source code file any more.
[Gandalf]




PostPosted: Fri Aug 18, 2006 1:33 am   Post subject: Re: reply

You're being a bit unclear...
uberwalla wrote:
because even if u have the exe u need them to be able to run the exe. i know u dont need the source code file any more.

All you need to run the .exe is the .exe, and whatever media you used in your program. Media is stuff like .jpg files, and .mp3's, not .t or .tu source code files.
Cervantes




PostPosted: Fri Aug 18, 2006 7:34 am   Post subject: Re: reply

uberwalla wrote:
what i mean about no extra files is like... the buffer stuff.
(the includes[.tu])

because even if u have the exe u need them to be able to run the exe. i know u dont need the source code file any more.

No, .tu files ARE source code. You don't need them for the .exe to work, as Gandalf said.
TheOneTrueGod




PostPosted: Fri Aug 18, 2006 1:54 pm   Post subject: (No subject)

I think the original poster means:
Can he have a user login screen that stores its information in-program.

I.E.
I create a new user account called "TOTG"
I set the password to "Pie"

He wants this name/password to be stored INSIDE the EXE, as opposed to being stored in a text file.

The answer for this is no, unless you only use hardcoded user accounts.

You could allways just encrypt the text file that has the user names and passwords, so you can't just open it and know what the passwords are...
Sponsor
Sponsor
Sponsor
sponsor
uberwalla




PostPosted: Fri Aug 18, 2006 2:22 pm   Post subject: reply

TY theonetruegod u got exactly what i meant. sorry guys for being unclear...

anyway... im not really good for encrytion stuff like i could find one but i wouldnt know where to add it in for the program could work.

If anyone has any time could they possibly make me the source code for the encryption and passwords together? plz Very Happy

i wanna input it in my game so i can create a password per level so if u did lvl 3 this say u can play it again without going through the whole game.
Clayton




PostPosted: Fri Aug 18, 2006 3:30 pm   Post subject: (No subject)

the answer to your question is no, we will not do it for you, however, if you show us what you have attempted, and tell us where your problem is we will help you figure it out. we do this because you are not learning anything if we just give you the answer Wink

there have been a fair few topics on encryption, use the handy dandy search tool at the top of the forum to search encryption techniques, see what you can come up with, then post back here Very Happy
md




PostPosted: Fri Aug 18, 2006 6:09 pm   Post subject: (No subject)

TheOneTrueGod wrote:
I think the original poster means:
Can he have a user login screen that stores its information in-program.

I.E.
I create a new user account called "TOTG"
I set the password to "Pie"

He wants this name/password to be stored INSIDE the EXE, as opposed to being stored in a text file.

The answer for this is no, unless you only use hardcoded user accounts.

You could allways just encrypt the text file that has the user names and passwords, so you can't just open it and know what the passwords are...


Actually... technically you are wrong (well... kinda). I theory you could have a set amount of space reserved within your program to store passwords and usernames. Then your program would have to edit it's own executable and edit that reserved space. Is that doable? Yes. Is is doable from the running executable? Depends on the operating system. Oh, and it is rather difficult and requires knowing a lot about hte structure of hte executable.

So no, in practice it is not possible without more work then it is worth (and even if you did do it... unless you encrypt it it's still plain text); but technically with enough work it is potentially feasable.
uberwalla




PostPosted: Fri Aug 18, 2006 6:30 pm   Post subject: reply

superfreak i know how to do everything by itself... like i am not new to turing i know how to do things.

But what i need to know is how to add "*****" and working password/username working together thing

and if needed encrypting.
Clayton




PostPosted: Fri Aug 18, 2006 7:00 pm   Post subject: (No subject)

what code have you tried so far? were not just going to hand over an answer to your problem, we have to see a genuine effort on your part, otherwise you learn nothing by us doing the work for you
NikG




PostPosted: Sat Aug 19, 2006 12:00 pm   Post subject: Re: reply

uberwalla wrote:
superfreak i know how to do everything by itself... like i am not new to turing i know how to do things.

But what i need to know is how to add "*****" and working password/username working together thing

and if needed encrypting.
If you're not new to Turing, and you have a strong enough grasp of programming, then you should have no problem creating that alternate character ("*") password program. Just think about what goes into creating something like that.
uberwalla




PostPosted: Sun Aug 20, 2006 3:48 pm   Post subject: reply

i dont have the problem making the programs, i have the problem putting them all in one Confused
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: