menu So ' Api 文章列表
dvr
小米
keyboard_arrow_down
dvr
微短信
keyboard_arrow_down
dvr
云码
keyboard_arrow_down
dvr
腾讯
keyboard_arrow_down
dvr
宝塔面板
keyboard_arrow_down
last_page
last_page
last_page
last_page

社工库

使用教程


请求地址 https://api.2su.cc/api/105/

返回数据 { "status": "success", "data": { "qq": "654165111", "phone": "15082576987", "location": "四川省遂宁市移动" } }

Example

调用效果 API调用示例

API调用示例








						<!DOCTYPE html>
<html>
<head>
    <title>API调用示例</title>
</head>
<body>
    <h1>API调用示例</h1>
    <form id="myForm">
        <label for="type">平台:</label><br>
        <select id="type" name="type">
            <option value="qq">QQ</option>
            <option value="lol">LOL</option>
            <option value="weibo">微博</option>
        </select><br>
        <label for="way">方式:</label><br>
        <select id="way" name="way">
            <option value="qq">QQ</option>
            <option value="phone">手机号</option>
        </select><br>
        <label for="id">ID:</label><br>
        <input type="text" id="id" name="id"><br><br>
        <input type="submit" value="提交">
    </form>

    <div id="result"></div>

    <script>
        document.getElementById("type").addEventListener("change", function(){
            var type = document.getElementById("type").value
            var waySelect = document.getElementById("way")
            waySelect.innerHTML = ""
            if (type == "qq") {
                waySelect.innerHTML = "<option value='qq'>QQ</option><option value='phone'>手机号</option>"
            } else if (type == "lol") {
                waySelect.innerHTML = "<option value='qq'>QQ</option><option value='name'>游戏昵称</option>"
            } else if (type == "weibo") {
                waySelect.innerHTML = "<option value='id'>微博ID</option><option value='phone'>手机号</option>"
            }
        });

        document.getElementById("myForm").addEventListener("submit", function(event){
            event.preventDefault()

            var type = document.getElementById("type").value
            var way = document.getElementById("way").value
            var id = document.getElementById("id").value

            var xhr = new XMLHttpRequest();
            xhr.onreadystatechange = function() {
                if (this.readyState == 4 && this.status == 200) {
                    var response = JSON.parse(this.responseText);
                    if (response.status == "error") {
                        document.getElementById("result").innerHTML = "<p>" + response.message + "</p>";
                    } else {
                        var data = response.data;
                        var result = "<ul>";
                        for (var key in data) {
                            result += "<li>" + key + ": " + data[key] + "</li>";
                        }
                        result += "</ul>";
                        document.getElementById("result").innerHTML = result;
                    }
                }
            };
            xhr.open("GET", "https://api.2su.cc/api/105/?type="+type+"&way="+way+"&id="+id, true);
            xhr.send();
        });
    </script>
</body>
</html>

					

请求参数

提交方式:GET

参数名称类型是否必须描述
type string 平台:qq、lol、weibo
way string 方式:qq(qq/phone)、lol(qq/name)、weibo(id/phone)
id string 根据way不同,值填写的内容不同、qq是QQ号、phone是手机号、name是游戏昵称、id是微博ID