久久天天躁狠狠躁夜夜免费观看,精品国产粉嫩内射白浆内射双马尾,久久国产欧美日韩精品,久久久久久性高,激情欧美成人久久综合

Java爬取百度云觀測(cè)對(duì)網(wǎng)站的檢測(cè)數(shù)據(jù),獲取子域名及域名的安全信息

JSON 2020-03-31 20:12:21 8107

百度云觀測(cè)有對(duì)域名的檢測(cè)還比較全面。下面我們來(lái)抓取下內(nèi)容看看。


Java抓取代碼

直接上代碼,HTTP工具類暫時(shí)不能提供給您,您隨便自己請(qǐng)求就可以了,只要能通,能返回?cái)?shù)據(jù)。

//獲取子域名 & 子域名評(píng)分
public List<DomainCheckInfoDto.SSLDomain> SSLDomains(String surl){
    String domain = StringUtils.getHost(surl);

    surl = String.format("http://ce.baidu.com/index/getRelatedSites?site_address=%s", StringUtils.strToUrlcode(surl))      ;

    List<DomainCheckInfoDto.SSLDomain> domainList = new ArrayList<>();
    String res = Http.create(surl).
            head("Accept", "application/json, text/javascript, */*; q=0.01")
            .head("Accept-Encoding", "gzip, deflate")
            .head("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8")
            .head("Cache-Control", "no-cache")
            .head("Connection", "keep-alive")
            .head("Cookie", "您的百度登錄Cookie")
            .head("Host", "ce.baidu.com")
            .head("Pragma", "no-cache")
            .head("Referer", String.format("http://ce.baidu.com/index/guance?start_url=%s", domain))
            .head("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36")
            .head("X-Requested-With", "XMLHttpRequest")
            .timeout(3)
            .readTimeout(3)
            .get().send().getResponse().getResult();
    if(StringUtils.isNotBlank(res) ){

        JSONObject json = JSONObject.fromObject(res);
        int code = json.optInt("code", 1);
        if(0 == code){//成功
            JSONArray data = json.optJSONArray("data");

            //最多弄10個(gè)域名,有的時(shí)候子域名太多了
            for (int i = 0; i < data.size() && i< 10; i++) {
                Object datum = data.get(i);
                JSONObject target = null;
                if(datum instanceof  JSONObject){
                    target = (JSONObject)datum;
                }else{
                    target = JSONObject.fromObject(datum);
                }
                DomainCheckInfoDto.SSLDomain sslDomain = new DomainCheckInfoDto.SSLDomain(target);

                domainList.add(sslDomain);
            }

        }
    }
    return domainList;
}

然后里面有一個(gè)實(shí)體類:

@Data
@AllArgsConstructor
@NoArgsConstructor
public static class SSLDomain{
    //分值
    private int  score;
    //域名
    private String  domain;

    public SSLDomain(JSONObject obj){
        this.score = obj.optInt("score", 60);
        this.domain = obj.optString("domain", "");
    }
}

數(shù)據(jù)返回:

{
    "attackSSL":{
        "name":"攻擊風(fēng)險(xiǎn)",
        "score":75,
        "scoreDelta":0
    },
    "cateId":"medial",
    "cateName":"影視音樂(lè)",
    "cateScore":60,
    "domainLastScore":54,
    "domainSize":10,
    "domsins":[
        {
            "domain":"air.sojson.com",
            "score":84
        },
        {
            "domain":"api.sojson.com",
            "score":54
        },
        {
            "domain":"css.sojson.com",
            "score":80
        },
        {
            "domain":"fm.sojson.com",
            "score":80
        },
        {
            "domain":"icp.sojson.com",
            "score":94
        },
        {
            "domain":"js.sojson.com",
            "score":65
        },
        {
            "domain":"m.sojson.com",
            "score":80
        },
        {
            "domain":"open.sojson.com",
            "score":90
        },
        {
            "domain":"sojson.com",
            "score":90
        },
        {
            "domain":"t.weather.sojson.com",
            "score":80
        }
    ],
    "envSSL":{
        "name":"網(wǎng)站服務(wù)",
        "score":40,
        "scoreDelta":0
    },
    "historySSL":{
        "name":"網(wǎng)站歷史安全",
        "score":100,
        "scoreDelta":0
    },
    "id":"17bb1d64a239c585",
    "rank":0,
    "realtimeSSL":{
        "name":"網(wǎng)站惡意內(nèi)容",
        "score":75,
        "scoreDelta":0
    },
    "synopsis":73,
    "updatedTime":"2020-03-31 17:51:27"
}

這個(gè)是查詢SOJSON.COM的結(jié)果


版權(quán)所屬:SO JSON在線解析

原文地址:http://suancuo.cn/blog/361.html

轉(zhuǎn)載時(shí)必須以鏈接形式注明原始出處及本聲明。

本文主題:

如果本文對(duì)你有幫助,那么請(qǐng)你贊助我,讓我更有激情的寫(xiě)下去,幫助更多的人。

關(guān)于作者
一個(gè)低調(diào)而悶騷的男人。
相關(guān)文章
Java獲取域名,Java從URL地址中獲取域名Java從Request 獲取域名
根據(jù)域名獲取IP地址,Java 獲取域名的IP地址
網(wǎng)站域名檢測(cè)有哪些好處?
網(wǎng)站域名檢測(cè)有哪些好處?
Java 正則獲取一級(jí)域名
HttpClient獲取訪問(wèn)域名的真實(shí)ip,HttpClient請(qǐng)求獲取目標(biāo)IP地址
Javascript 判斷域名合法性,JS域名格式檢測(cè)
【2020年】百度搜索詞獲取獲取百度搜索的關(guān)鍵詞【真實(shí)有效】
網(wǎng)站時(shí)域名有哪些重要性?詳細(xì)解答
網(wǎng)站時(shí)域名有哪些重要性?詳細(xì)解答
最新文章
計(jì)算機(jī)網(wǎng)絡(luò)的相關(guān)內(nèi)容 354
SOJSON V6 JavaScript 解密技巧與分析 5940
微信客服人工電話95068:如何快速解封微信賬號(hào)(2025最新指南) 11885
Java Http請(qǐng)求,HttpURLConnection HTTP請(qǐng)求丟失頭信息,Head信息丟失解決方案 5052
實(shí)用API合集分享:教你輕松獲取IP地址的API合集 8839
Linux I/O重定向 6705
Ruby 循環(huán) - while、for、until、break、redo 和 retry 3990
Node.js:全局對(duì)象 3604
如何使用終端檢查L(zhǎng)inux上的內(nèi)存使用情況 3779
JavaScript對(duì)象詳細(xì)剖析 3252
最熱文章
免費(fèi)天氣API,天氣JSON API,不限次數(shù)獲取十五天的天氣預(yù)報(bào) 745370
最新MyEclipse8.5注冊(cè)碼,有效期到2020年 (已經(jīng)更新) 703112
蘋(píng)果電腦Mac怎么恢復(fù)出廠系統(tǒng)?蘋(píng)果系統(tǒng)怎么重裝系統(tǒng)? 678428
Jackson 時(shí)間格式化,時(shí)間注解 @JsonFormat 用法、時(shí)差問(wèn)題說(shuō)明 561958
我為什么要選擇RabbitMQ ,RabbitMQ簡(jiǎn)介,各種MQ選型對(duì)比 511823
Elasticsearch教程(四) elasticsearch head 插件安裝和使用 483716
Jackson 美化輸出JSON,優(yōu)雅的輸出JSON數(shù)據(jù),格式化輸出JSON數(shù)據(jù)... ... 299543
Java 信任所有SSL證書(shū),HTTPS請(qǐng)求拋錯(cuò),忽略證書(shū)請(qǐng)求完美解決 246654
Elasticsearch教程(一),全程直播(小白級(jí)別) 232088
227528
支付掃碼

所有贊助/開(kāi)支都講公開(kāi)明細(xì),用于網(wǎng)站維護(hù):贊助名單查看

查看我的收藏

正在加載... ...