以前可以使用JavaScript中的Store
对象访问http://web.whatsapp.com/。几个小时前,这种方法停止工作了。现在它如何更新聊天数据?它一定会把数据保存在某个地方。
以前可以使用JavaScript中的Store
对象访问http://web.whatsapp.com/。几个小时前,这种方法停止工作了。现在它如何更新聊天数据?它一定会把数据保存在某个地方。
setTimeout(function() {
// Returns promise that resolves to all installed modules
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
window["webpackJsonp"](
[],
{
[id]: function(module, exports, __webpack_require__) {
resolve(__webpack_require__.c);
}
},
[id]
);
});
}
var modules = getAllModules()._value;
// Automatically locate modules
for (var key in modules) {
if (modules[key].exports) {
if (modules[key].exports.default) {
if (modules[key].exports.default.Wap) {
store_id = modules[key].id.replace(/"/g, '"');
}
}
}
}
}, 5000);
function _requireById(id) {
return webpackJsonp([], null, [id]);
}
// Module IDs
var store_id = 0;
var Store = {};
function init() {
Store = _requireById(store_id).default;
console.log("Store is ready" + Store);
}
setTimeout(function() {
init();
}, 7000);
只需将内容复制并粘贴到控制台中,等待出现“Store is ready”的消息即可。 享受吧!
getAllModules()
会返回一个承诺,其中包含Webpack中安装的所有模块。 可以使用_requireById(id)
通过ID来要求每个模块,该方法使用Webpack公开的webpackJsonp (...)
函数。!function(){for(var t of document.getElementsByTagName("script"))t.src.indexOf("/app.")>0&&fetch(t.src,{method:"get"}).then(function(t){return t.text().then(function(t){var e=t.indexOf('var a={};t["default"]')-89;window.ZStore=window.webpackJsonp([],null,JSON.stringify(t.substr(e,10))).default})})}();
window.ZStore 将包含该对象。
未压缩版本:
(function() {
function getStore(url) {
fetch(url, {
"method": 'get'
}).then(function(response) {
return response.text().then(function(data) {
var offset = data.indexOf('var a={};t["default"]') - 89;
window.ZStore = window.webpackJsonp([], null, JSON.stringify(data.substr(offset, 10))).default
});
});
}
for (var e of document.getElementsByTagName("script")) {
if (e.src.indexOf("/app.") > 0) getStore(e.src);
}
})();