Login Register






A C++ Password Program filter_list
Author
Message
RE: A C++ Password Program #11
Huh, so you would get to the 492093th line that includes a password...
To hack is a skill, but a skill may or may not be to hack.


RE: A C++ Password Program #12
i don't understand, what do you mean by "492093th line" ? the password is 492093, and it doesn't have any meaning with the code's line...
[Image: ap8g35.jpg]


RE: A C++ Password Program #13
I was suggesting that the password was from a file and that, ah never mind. Sad

I really wish I could just lock my threads. Smile
To hack is a skill, but a skill may or may not be to hack.


RE: A C++ Password Program #14
we all learning bro... Biggrin
[Image: ap8g35.jpg]


RE: A C++ Password Program #15
I tried thread tools but that didn't have anything about it. :/
To hack is a skill, but a skill may or may not be to hack.


RE: A C++ Password Program #16
i am new to C programming so cant say anything


RE: A C++ Password Program #17
Also a little bit more insight. You probably tried to use strcmp as
Code:
if (strcmp("hello",cstring_that_says_hello)) { //same string }
when actually, if strcmp finds that the strings are the same, it returns 0, not true.

Code:
if (strcmp("hello","hello") == 0) { //these strings are the same }

Also it doesn't have to be from a file. You could just have the user set it at the first run of the program then you could store it in an encrypted database (which is a file) or update a resource with it in there, or you could set it as a registry value,... there's no limit as to what you could do.


RE: A C++ Password Program #18
(09-16-2012, 04:18 PM)Rodaxoleaux the Lab Rat Wrote: Also a little bit more insight. You probably tried to use strcmp as
Code:
if (strcmp("hello",cstring_that_says_hello)) { //same string }
when actually, if strcmp finds that the strings are the same, it returns 0, not true.

Code:
if (strcmp("hello","hello") == 0) { //these strings are the same }

Also it doesn't have to be from a file. You could just have the user set it at the first run of the program then you could store it in an encrypted database (which is a file) or update a resource with it in there, or you could set it as a registry value,... there's no limit as to what you could do.


Yes, I was going to do that, but for SOME reason, it wouldn't let me do that. I added the whole header file and that, but it really didn't work. So annoying. :headbash:

Anyway, the biggest point was to get the string with hidden input. Biggrin:epic:

[Also, after looking back on my code, I think I should have added \n at the end of the string. Wink]
To hack is a skill, but a skill may or may not be to hack.


RE: A C++ Password Program #19
Good conversation,
i try self and working life charm,
Excellent work guys,
Thanks all of you.


RE: A C++ Password Program #20
(04-21-2012, 08:35 PM)Frooxius Wrote:
Also there's no reason to put code in curly brackets if you don't have more than one statement. It could be rewritten as this:

Actually there are good reasons to use curly brackets, even if you have only one statement.

People tend to forget them, when they add new statements and do something like this, wondering why it doesn't work:

Code:
if(pass == PASSWORD) first statement; second statement;

Or people do something like this, also wondering why that doesn't work:

Code:
if(pass == PASSWORD); second statement; //thinking this is the first statement

@killerOfCode, NERO: A hardcoded plaintext password is useless. Usually you use a cryptographic hash function for the password the user put in and compare the hash value with a saved one. This way you have no plaintext saved anywhere.
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]