09月22日, 2014 3140次
谷歌系列浏览器
开启设置暂留功能

开启替换后 选择替目录位置 然后就直接可以编辑js了
浏览器注入js拦截内容
if(s.value && s.value.hasOwnProperty('BaseResp') &&s.value.BaseResp !=undefined){
console.log(JSON.stringify(s.value));
var res=JSON.stringify(s.value);
var url = "https://127.0.0.1/res_juliang.php";
var params = {res: res, op: "yes"};
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onload = function (e) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.responseText);
} else {
console.error(xhr.statusText);
}
}
};
xhr.onerror = function (e) {
//console.error(xhr.statusText);
};
xhr.send(JSON.stringify(params));服务端php接收数据
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');
$res=@$_POST['res'];
$res=file_get_contents('php://input');
var_dump($res);
$file_res="juliang.txt";
if(!empty($res)){
file_put_contents(time().$file_res,$res,8);
}
print_r($res);
echo time();
暂无留言,赶快评论吧