Simple Password Generator. Finally, a channel I can relate to... well, that and Whose Line, of course. Uploaded for and giggles. Just a simple private project I fuck da police
x
Click to expand

Simple Password Generator

Simple Password Generator. Finally, a channel I can relate to... well, that and Whose Line, of course. Uploaded for and giggles. Just a simple private project I

Finally, a channel I can relate to... well, that and Whose Line, of course.

Uploaded for ***** and giggles. Just a simple private project I was working on. I'd like to eventually mix whole words into these options.

Code written and compiled by me.

It' s been awhile since I last uploaded anything.
Thankfully, there' s this geek' s channel, and being a
geek myself, why not use this as a sad excuse to show
off a simple password generator I made in Cer
E sasage,.
mama:
maca-
gnc) . nuee
2 using namespace std.‘
Global Constant:
ll nu: an
12 Conn: Ln: Hm
13 count: TDC :
15 // Prototype:
is mad passback_ " ICIC I; , cons: was aasham:
20 'equest
if Says aw
5 using namespace std.‘
5 (max passback_ ;
16 1: 1: Banana:
2 do
22 case 2
an case a;
an case
passback_ starr);
false:
as case
37 break
as default:
45 - false:
42 --Rozele
44 return J;
54 aunt.
5: 3x315]
escher'
return.‘
vaak pre: ( gnc 5
was
can " annus:
return:
was: passback_ ' " an I; , count was
anc cam. defined.‘
was Fl
Inbe: at
can " aerate
5.: 55555
catsuit_ ;
return.‘
And now for the execution of the program
asaen I.
e u/ onhan: -A characters (2, S.
was
Hello. 555 5515555 ' mp, Passwurd Lizard a.
315555555. 5 m 555. 5555 char 55... (- a
Qun
555555 5; characters. 22
e u/ onhan: -A characters (2, S.
was
was» Dasbeard . PGUP] Kqp
Hello. 555 5515555 ' mp, Passwurd Lizard a.
315555555. 5 m 555. 5555 char 55... (- a
Enter number a? characters. IE
7222572455
Numer .
Compiled and ran using , a standalone C/ Java
compiler for Windows using standard UNIX commands.
Code written in Notepaper
Constructive feedback is appreciated.
If this confused anyone, here' s a bunny for the trouble.
Why?
Because cats are overrated.
...
  • Recommend tagsx
+26
Views: 2145
Favorited: 4
Submitted: 07/27/2012
Share On Facebook
Add to favorites Subscribe to valetparking Subscribe to computer-geek submit to reddit
What do you think? Give us your opinion. Anonymous comments allowed.
#19 - SwiftNinja (07/28/2012) [-]
Or instead of using code, you can smash the keyboard with your fist to generate passwords.

fdsylxbn
[oijnkdzo
lkhbzdsvs
mf8h0[9j3g
9vmnf873tn
90uh04b
uin4397b
User avatar #3 - rustyrabbit (07/27/2012) [+] (7 replies)
You could have saved lots of typing and lines of code by just using loop(s) to fill your ascii array.

for (int i = (int) 'a'; i <= (int) 'z'; i++)
{
ascii[ i - (int) 'a']
}

that example should fill your ascii array with:

[0] = a
[1] = b
[2] = c
...
...
...
[25] = y
[26] = z



Haven't tested it though :P
User avatar #13 - nildnas (07/28/2012) [+] (2 replies)
People really need to document your programs. This one was pretty easy to follow, but you should be in the habit of writing comments. It would really help people who don't understand coding follow the program.
With that aside, nice job. I think it would have been a little easier to have all that array code in a for loop, and increment an ascii value each time. I think there is a function you can import to convert from ascii to alphanumeric. If I'm wrong, then for a small program like this, you went about it correctly.
User avatar #1 - rshowat ONLINE (07/27/2012) [+] (1 reply)
Would you be willing to upload and share? Would love to expand on this.
User avatar #7 to #1 - valetparking (07/27/2012) [-]
if i can get the same code for Java, i'd like to release it (or a more enhanced version thereof) as an app for Android phones and maybe earn some much-needed cash. for now, though, this is simply a proof-of-concept.
#28 - anonymous (07/28/2012) [+] (1 reply)
dude i'm majoring in computer science and that's honestly the most "ugly" piece of code i've ever seen
User avatar #23 - hillaryisacunt (07/28/2012) [+] (3 replies)
A few more things i noticed from a quick look

> as you're using C++ , and not C , try using strings .

> string ascii = "01234567..... ( you get the idea ) , does the exact same thing

> you used switch case when you're supposed to use if else ( main() ) , and if else when you should use switch case ( password_genertor() )

> you're using return ; in void functions at the end , which is pointless . The only reason to use return in a void function is to return from the function conditionally ( i.e inside if else ) without running the rest of the function...not at the end

> you used a "pass by reference" ( presentMenu ) where a integer returning function makes more sense

> #include is almost same as copy-paste so , as you can see you included headers such as <iostream> twice , once each in header and source . Only reason you didn't get errors were because of the include guards inside those headers .
User avatar #22 - hillaryisacunt (07/28/2012) [+] (1 reply)
If I remember correctly , you're really not supposed to use rand() for generating passwords ( psudo-random , thus not safe ) .

This is probably just for leaning purposes , so it's fine . But if you ever do serious work , this is no good .

I'm using linux , so I just read from /dev/random .
Windows doesn't have /dev/random , but it does have a cryptography api , which is the standard way to do this ( though i've never personally used ) .
#21 - bahjy (07/28/2012) [-]
Grats Grats Grats
I recommend using Java much easier than Objective-C / C++
#18 - Spikeydeath (07/28/2012) [+] (2 replies)
how can i learn code?
 Friends (0)