最后更新于 .

最近工作需要需要接触Magento,本地部署后不方便问管理员密码,于是手动改数据库之。

从300多个表中人肉搜索到了后台管理员表“admin_user“,字段是password。

密码存储方式类似md5但是后面还有几个字串。经研究,生成密码方式如下:

function getRandomString($len, $chars=null)
{
if (is_null($chars)) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
}
mt_srand(10000000*(double)microtime());
for ($i = 0, $str = '', $lc = strlen($chars)-1; $i < $len; $i++) {
$str .= $chars[mt_rand(0, $lc)];
}
return $str;
}
function getHash($password, $salt=false)
{
if (is_integer($salt)) {
$salt = getRandomString($salt);
}
return $salt===false ? md5($password) : md5($salt.$password).':'.$salt;
}

echo getHash("123456", 2);


如果懒的写测试程序,可以直接把下面加密串写入数据库,密码是123456:
29432ec2c86feb1d6ead14e35842bfc3:aQ

Pingbacks

Pingbacks已关闭。

评论

  1. Ezra

    Ezra 发布于 #

    When attempting to slim down as low Serotonin levels are linked to emotional eating this is of advantage to
    you.

  2. Nona

    Nona 发布于 #

    Unfortunately not everyone has discipline and
    the time it requires to take on the kind of life style changes necessary for weight loss.

  3. Harriett

    Harriett 发布于 #

    There are individuals that have reduced weight rather dramatically out of their regular use of the Dr Garcinia Cambogia
    supplements and pills, but yet in exactly the same way as it was prescribed by the doctors.

  4. Geoffrey

    Geoffrey 发布于 #

    Garcinia is a carbohydrate blocker and will confine the
    conversion of carbs into glucose or energy which if not used up will subsequently be stored
    as fat.

  5. native garcinia cambogia extract walmart

    native garcinia cambogia extract walmart 发布于 #

    GHI Garcinia Cambogia is created in the United States in a state of the art FDA registered lab that conforms to the tested level strength and purity of
    USP quality standards and is manufactured under the stringent guidelines of the U.S.
    Food and Drug Administration's cGMP certification.

  6. Delmar

    Delmar 发布于 #

    Le régime Pure Cambogia Ultra est basé sur son composé naturel, l'acide
    hydroxycitrique, aussi connu sous le HCA.

  7. ultra garcinia cambogia extract walmart

    ultra garcinia cambogia extract walmart 发布于 #

    Garcinia gummi-gutta is a tropical 2 species of Garcinia native to Indonesia Common names comprise garcinia cambogia (a former scientific name), too as gambooge, citation needed brindleberry, citation needed brindall berry,
    citation needed Malabar tamarind, 2 assam fruit, citation needed
    vadakkan puli (northern tamarind) citation needed and kudam puli (pot tamarind).

  8. Micaela

    Micaela 发布于 #

    According to those targeting moderate weight loss, the research my take 1500 mg of
    Garcinia Cambogia as appropriate dosage while those who want to
    achieve competitive weight-loss goals may select for 3000 mg dosage per day.

  9. Ismael

    Ismael 发布于 #

    Hence, since garcinia cambogia slender pills significantly block fats from being consumed, 12 weeks should be more than enough for noticeable weight reduction, particularly when paired with healthy exercise routines, which
    you should try to continue even after you finish your
    3 months of garcinia cambogia supply.

  10. Russell

    Russell 发布于 #

    If you're breastfeeding or pregnant, have symptoms of dementia or Alzheimer's, or are
    on diabetic meditation, you should not take Garcinia
    Cambogia supplements.

  11. Temeka

    Temeka 发布于 #

    More than several types of details about this product here give an entire support to every visitor to know about Pure Garcinia Cambogia totally.

  12. Jennifer

    Jennifer 发布于 #

    Little info can be found on potential side effects when adding garcinia to the diet, cautions eMedTV because research is short.

  13. Deanne

    Deanne 发布于 #

    It can be dangerous if not correctly executed and used, although, numerous advantages
    are spelt by testosterone replacement therapy.

  14. Forrest

    Forrest 发布于 #

    A low fat diet is probably going to be high in sugar and
    a barbarous enemy to your testosterone levels.

  15. anti aging supplements amazon

    anti aging supplements amazon 发布于 #

    In this time, 2.8 percent of men on hormone therapy had inpatient psychiatric treatment, compared with 1.9 percent of their peers.

  16. anti aging supplements

    anti aging supplements 发布于 #

    Girls begin to experience menopause after a particular age and there are symptoms for example night sweats, in addition to decline in sexual desire and
    hot flashes.

  17. Madison

    Madison 发布于 #

    If a restore is required Choice Quality Control division will
    resolve whether the printer ought to be sent to our
    third occasion technicians.

  18. hengzixing.com

    hengzixing.com 发布于 #

    It is pricey at around $300 online however it's state
    of the art for printing from the web with many useful apps- it is going
    to additionally print something on your iPad as
    straightforward as pie.

  19. Oliver

    Oliver 发布于 #

    Understanding where your testosterone injections are
    coming from, and many guys detail crucial and vital yet, so easily
    bypassed the standards by which they are created.

  20. Chante

    Chante 发布于 #

    Mammograms and monitoring of prostate-specific antigen, hematocrit, and lipid levels are recommended for patients taking testosterone.

  21. Roma

    Roma 发布于 #

    Solution:- The apparent fix right here works.

发表评论