PHP Password Generator

Thread Solved

Join Date: May 2008
Posts: 305
Reputation: samarudge is an unknown quantity at this point 
Solved Threads: 28
samarudge samarudge is offline Offline
Posting Whiz

PHP Password Generator

 
0
  #1
Feb 26th, 2009
Hi,
I am developing a piece of software which is not in any way being designed to hack into my schools proxy server using HTTP auth
At the moment I have got it to generate random passwords of a random length, however using this method it is sometimes repeating passwords and there is no logical order to follow. Is there any way to get my PHP app to generate passwords in sequence (I know the passwords contain letters a-z A-Z and numbers 0-9)
a -> A -> b ->B etc.
Then move on to
aa -> aA -> ab -> aB etc.
then
ba -> bA etc
or something like that as in it trys each possible character then adds another character to the string and loops.
Regards,
Sam Rudge
P.S. Never try to hack the admin password for your school proxy, it can get you in a lot of trouble lol
--
Stalk me: @samarudge
=)
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,538
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 256
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: PHP Password Generator

 
0
  #2
Feb 26th, 2009
Exactly, that's why most people here probably wont and shouldn't help you with this.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 151
Reputation: mschroeder is on a distinguished road 
Solved Threads: 25
mschroeder mschroeder is offline Offline
Junior Poster

Re: PHP Password Generator

 
0
  #3
Feb 26th, 2009
php simply isn't meant for this kind of thing, regardless of its intention, albeit yours is a pretty useless one. On the basis of an 8 character password, where each letter can be 1 of 62 possibilities (a-zA-Z0-9) that is 9.807971461541689e+55 possibilities.

Good luck with that.
If you're question/problem is solved don't forget to mark the thread as Solved!

-- Code I post is usually but not always tested. If it is tested it will be against 5.2.12 or 5.3.1
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 305
Reputation: samarudge is an unknown quantity at this point 
Solved Threads: 28
samarudge samarudge is offline Offline
Posting Whiz

Re: PHP Password Generator

 
0
  #4
Feb 26th, 2009
OK no need to get stroppy, and btw i was able to get 650 attempts per second with my laptop alone and I have 5 exactly the same + a load of friends with laptops who have said they will run the application. Im running it from a command window not through apache or IIS etc. I also know the password begins with H and is 7-10 characters long. I can also access the proxy with my home servers using VPN. Also i dont know any other languages that can process 650 requests per second and not slow or crash the laptops.
--
Stalk me: @samarudge
=)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 2,105
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 180
Sponsor
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
XReplicator - Genius47

Re: PHP Password Generator

 
0
  #5
Feb 27th, 2009
If you want a random password for general purposes then simply just do a hash of the current date, time and microtime. The following is an example:
  1. echo substr(hash('sha1',date('d F Y G i s u')),0,10);

But if you are trying to hack into a school network like you have mentioned then try the following:
  1. //settings
  2. $chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz";
  3. $minchars=8;
  4. $maxchars=10;
  5.  
  6. //rest of script
  7. $escapecharplus=0;
  8. $repeat=mt_rand($minchars,$maxchars);
  9. while ($escapecharplus<$repeat)
  10. {
  11. $randomword.=$chars[mt_rand(1, strlen($chars)-1)];
  12. $escapecharplus+=1;
  13. }
  14. //display random word
  15. echo $randomword;
The above code is what I used in my sha1 cracker.
Try not to bump 10 year old topics as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` Want 1 on 1 php help, add me to msn at msn@cwarn23.info
My favourite PC. -- Jumba webhosting
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 305
Reputation: samarudge is an unknown quantity at this point 
Solved Threads: 28
samarudge samarudge is offline Offline
Posting Whiz

Re: PHP Password Generator

 
0
  #6
Feb 27th, 2009
Hmm, thanx but I already have it generating random passwords. I just wanted it to do an incremental attack. I think I will add all the letters to an array and work from there.
Regds,
Sam Rudge
--
Stalk me: @samarudge
=)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 2,105
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 180
Sponsor
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
XReplicator - Genius47

Re: PHP Password Generator

 
0
  #7
Feb 27th, 2009
Well if you are trying to get an admin password then wouldn't the most logical thing be to first work out how to communicate with their proxy server (probably sockets). Then to do a password injection into their system so there is a new account then when you go to use their computers simply use the admin password you injected into their system. I hear that is how most online hackers hack into websites.
Try not to bump 10 year old topics as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` Want 1 on 1 php help, add me to msn at msn@cwarn23.info
My favourite PC. -- Jumba webhosting
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 305
Reputation: samarudge is an unknown quantity at this point 
Solved Threads: 28
samarudge samarudge is offline Offline
Posting Whiz

Re: PHP Password Generator

 
0
  #8
Feb 27th, 2009
Yer but im 16 and the only languages I know are PHP, Perl, Python and C# I also think that creating a new user might make them find out. Or proxy is highly monitored.
--
Stalk me: @samarudge
=)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 2,105
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 180
Sponsor
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
XReplicator - Genius47

Re: PHP Password Generator

 
0
  #9
Feb 27th, 2009
Originally Posted by samarudge View Post
Yer but im 16 and the only languages I know are PHP, Perl, Python and C# I also think that creating a new user might make them find out. Or proxy is highly monitored.
I have not yet mentioned to use a different language. What sockets are is just another part of php which can be found out at http://au2.php.net/manual/en/function.socket-create.php Although I have never used php sockets before, from what I have read, the opening connection will look something like the following:
  1. $ipaddress='';// server ip address
  2. $socket = socket_create (AF_INET, SOCK_STREAM, tcp);
  3. socket_connect($socket,$ipaddress, 80);
Then after that connection established you can do whatever communications with the server using php sockets.
Try not to bump 10 year old topics as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` Want 1 on 1 php help, add me to msn at msn@cwarn23.info
My favourite PC. -- Jumba webhosting
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 629
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 103
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Practically a Master Poster

Re: PHP Password Generator

 
0
  #10
Feb 27th, 2009
Originally Posted by mschroeder View Post
On the basis of an 8 character password, where each letter can be 1 of 62 possibilities (a-zA-Z0-9) that is 9.807971461541689e+55 possibilities.
Or 62^8, or 218,340,105,584,896 possibilities...

Originally Posted by samarudge View Post
i was able to get 650 attempts per second with my laptop alone and I have 5 exactly the same
Ok, 5 of them, assuming you figure a way to start at a certain position and not just do the exact same on all 5 would be 3,250/second.
or 3,639,001,759,748.26 Seconds,
or 60,650,029,329.13 Minutes,
or 1,010,833,822.15 Hours
or 50,541,691.10 Days
or 138,470.38 Years
(please correct me if my math is wrong, its the end of a long day )

Either way, it will take a long time with a PC (or PCs) like yours.

Oh, and in response to your actual question:
Originally Posted by samarudge View Post
Is there any way to get my PHP app to generate passwords in sequence
Yes.
Last edited by Will Gresham; Feb 27th, 2009 at 9:52 pm.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 2502 | Replies: 14
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC