0
点赞
收藏
分享

微信扫一扫

Linux CentOS java JDK17

闲嫌咸贤 2024-08-21 阅读 60

需要借助的hook强制打开微信DevTools的工具:
https://github.com/JaveleyQAQ/WeChatOpenDevTools-Python

window[1].wx.getStorageInfo({
  success: function(res) {
    console.log(res.keys); 
    res.keys.forEach(function(key) {
      var value = window[1].wx.getStorageSync(key);
      console.log('Key: ' + key + ', Value: ' + JSON.stringify(value));
    });
  },
  fail: function() {
    console.error('获取存储信息失败');
  }
});
window[1].wx.getUserCryptoManager().getLatestUserKey({
    success: res => {
        var timestamp = res.expireTime; 
        var date = new Date(timestamp);
        var year = date.getFullYear();
        var month = ('0' + (date.getMonth() + 1)).slice(-2); // getMonth() 返回的月份是从0开始的
        var day = ('0' + date.getDate()).slice(-2);
        var hours = ('0' + date.getHours()).slice(-2);
        var minutes = ('0' + date.getMinutes()).slice(-2);
        var seconds = ('0' + date.getSeconds()).slice(-2);
        var formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
        console.log(JSON.stringify({
            version: res.version,
            key: res.encryptKey,
            iv: res.iv,
            expireTime: formattedDate
        }));
    }
});

仅做代码交流学习使用

举报

相关推荐

0 条评论