如何查找qq看点里用户的qq号

如何查找qq看点里用户的qq号

其实用户的qq信息被藏在了看点用户信息的url内,下面随便找一个用户,点开他的头像,看看这个用户的url。(手机端点开用户头像后可以点击右上角,有复制链接这一选项)

https://kandian.qq.com/mqq/vue/main?_wv=10209&_bid=3302&adfrom=qqshare&x5PreFetch=1&accountId=MzQyMDEwMjU0&adtag=qqshare&t=1590562361290

其中涉及到用户qq的就是accountId
这是qq号经过base64加密之后得到的,所以只需要解密就好,对于javascript里的解密base64的函数为

window.atob();

为了方便大家使用,我做成了网页版并放到了我的阿里云服务器上,大家可以直接使用。(只做了手机端适配,但是功能简单,电脑端一样能用。)

点我进入

下面是源码

css

    .main{
            width:100%;
            background-color: rgba(207, 255, 94,0.4);
            height:260px;
        }
        input{
            width:70%;
            height:30px;
        }
        button{
            outline: none;
            border: none;
            width:70px;
            height:50px;
            background: white;
            font-family: "微软雅黑";
            color:green;
            font-size: 22px;
            margin-top: 16px;
        }
        div{
            text-align: center;
            margin-top: 20px;
        }

javascript

function toFind(){
            var userInput = document.getElementById('userInput').value;
            if(userInput.indexOf('accountId')>=0&&userInput.indexOf('adtag')>=0){
                var qq = window.atob(userInput.split("accountId=")[1].split("&")[0]);
                document.getElementById("showUserQQ").innerHTML = "用户的qq为:"+qq+",已复制到粘贴板!"
                document.getElementById("userInput").value = qq
                let Url2=document.getElementById("userInput");
                Url2.select(); // 选择对象
                document.execCommand("Copy");
            }
            else{
                alert("链接有误!")
            }
            
        }

html

 <div class="main">
        <p>点击qq看点的用户头像,然后再点击右上角选择复制链接,在此粘贴复制的链接即可查询用户qq号:p><div><input id="userInput"/>div>
        <button onclick="toFind()">查询button>
        <div id="showUserQQ">
            
        div>
	<div style="text-align:center;"><span id="allCount">总访问数:span>div>
    div>

你可能感兴趣的:(实用小工具)