md5 php script

Discussion in 'PHP' started by Icog, Feb 9, 2010.

  1. #1
    Hello, Can someone change this script
     $hash = "9bf31c7ff062936a96d3c8bd1f8f2ff3";
    $char[1] = "0";
    $char[2] = "1";
    $char[3] = "2";
    $char[4] = "3";
    $char[5] = "4";
    $char[6] = "5";
    $char[7] = "6";
    $char[8] = "7";
    $char[9] = "8";
    $char[10] = "9";
    $top = count($char);
    For ($d = 0; $d <= $top; $d++)
    {
    $ad = $ae.$char[$d];
    for ($c = 0; $c <= $top; $c++)
    {
    $ac = $ad.$char[$c];
    for ($b = 0; $b <= $top; $b++)
    {
    $ab = $ac.$char[$b];
    for ($a = 0; $a <= $top; $a++)
    {
    $aa = $ab.$char[$a];
    if(md5($aa)==$hash)
    {
    die('Wachtwoord: '.$aa);
    }
    }
    }
    }
    }	
    	
    Code (markup):
    in particular
    die('Wachtwoord: '.$aa); 
    Code (markup):
    I want to be the outcome variable.
    instead
    die('Wachtwoord: '.$aa);
    Code (markup):
    of being example $a = .$aa



    when away
    die('Wachtwoord: '.$aa);
    Code (markup):
    results began to be repeated many times and there is my problem
     
    Icog, Feb 9, 2010 IP
  2. systematical

    systematical Peon

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are aware that php has built in functions for encryption including md5?

    http://php.net/manual/en/function.md5.php and also more advanced ones such as SHA, and rijndael-256 http://php.net/manual/en/function.mcrypt-module-open.php

     
    systematical, Feb 9, 2010 IP
  3. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    krsix, Feb 9, 2010 IP
  4. systematical

    systematical Peon

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    systematical, Feb 9, 2010 IP
  5. Brandon.Add.On

    Brandon.Add.On Peon

    Messages:
    178
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Technically an almost foolproof way would be to use md5(md5(str) . salt) . it prevents the hash from being tested against md5 tables.
     
    Brandon.Add.On, Feb 10, 2010 IP