2014-06-24 18:52:18

shodanhq.js

登陆状态下,切换到chrome控制台:
var url = "http://www.shodanhq.com/search?q=关键字&page=";
for(var i=1;i<101;i++){
    var request = null;
    if (window.ActiveXObject) {
        request = new ActiveXObject("Microsoft.XMLHTTP");
    }else {
        request = new XMLHttpRequest();
    }
    request.open("GET",url+i, false);
    request.setRequestHeader('If-Modified-Since', '0');
    request.send(null);
    var str = request.responseText;
    str = str.replace(/\r/g,"");
    str = str.replace(/\n/g,"");
    var urls = [];
    str.replace(/\<div class=\'ip\'>.*?<a href=\".*?\">(.*?)<\/a>.*?<\/div>/ig, function(a,b) {
        urls.push(b);
    });
    console.info(urls.join('\n'));
}

啪~,等待结果。

发表回复