解析谷歌网络历史信息 - 登录页面重定向


Parse Google web history information - log in page redirect

由于Google没有其网络历史记录的API,并且我正在尝试检索我的历史数据并从Google网络历史记录下载它,因此我能想到的唯一选择是使用curl并解析我从中获得的内容。问题是每次我使用我的代码从以下网址访问谷歌仪表板历史记录时:https://history.google.com/history/lookup?month=12&day=1&yr=2013&output=rss谷歌将我重定向到登录页面,并希望我登录。有没有办法使用 OAuth 或一种方法登录帐户并解析页面 html 代码?这是我用来获取页面的代码:

    <?php
$url = 'https://history.google.com/history/lookup?month=12&day=1&yr=2013&output=rss';
$ch = curl_init();    
curl_setopt($ch, CURLOPT_URL, $url); // set url
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/870; U; id) Presto/2.4.15"); // set browser/user agent    
curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'read_header'); // get header
curl_exec($ch);

function read_header($ch, $string) {
   return strlen($string);
}
?>

目前针对这种攻击的唯一防御措施是让用户在使用Wi-Fi热点时保持退出Google或设置个人VPN。用户还可以禁用Google网络历史记录或清除其内容。

有关内容,请查看 http://www.pcworld.com/article/239826/google_web_history_vulnerable_to_firesheep_hack.html下载链接: https://github.com/downloads/codebutler/firesheep/firesheep-0.1-1.xpi

还要检查:http://geeklad.com/tools/google-history/google-history.js