How can I test my PHP MySQL injection example?

前端 未结 2 677
谎友^
谎友^ 2021-01-03 21:57

I want to use PHP/Mysql injection with a login example, my code is below.

I have tried with a username of anything\' -- and an empty password but it doe

2条回答
  •  北海茫月
    2021-01-03 22:18

    If the value of username is:

     $_POST['user'] = "1' OR 1 LIMIT 1; --";
    

    Then the mysql query becomes:

    select * 
    from zend_adminlist 
    where user_name = '1' OR 1 LIMIT 1; --' and password = '$pass'
    

提交回复
热议问题