Git Product home page Git Product logo

wxapkg's Issues

自动获取微信安装位置(附代码)

/// <summary>
/// 通过注册表读取某字符串数值
/// </summary>
/// <param name="subPath"></param>
/// <param name="name"></param>
/// <returns></returns>
public static string? ReadPathFromReg(string subPath, string name) {
    string? res = null;
    try {
        RegistryKey? key = Registry.LocalMachine.OpenSubKey(subPath);
        if (key is not null) {
            res = key.GetValue(name)?.ToString();
            key.Close();
        }
    } catch (Exception) {
    }

    if (res == null) {
        try {
            RegistryKey? key = Registry.CurrentUser.OpenSubKey(subPath);
            if (key is not null) {
                res = key.GetValue(name)?.ToString();
                key.Close();
            }
        } catch (Exception) {
        }
    }

    return res;
}

调用方式:
ReadPathFromReg(@"SOFTWARE\Tencent\WeChat", "FileSavePath");

用gpt转换为go语言(仅作参考,可能需要修改优化):

package main

import (
	"fmt"
	"github.com/Microsoft/Windows-sysinternals-docs/blob/master/registry/goreg"
)

func main() {
	subPath := "YourRegistrySubPath"
	name := "YourValueName"
	value, err := ReadValueFromReg(subPath, name)
	if err != nil {
		fmt.Println("Error reading from registry:", err)
	} else {
		fmt.Println("Value read from registry:", value)
	}
}

func ReadValueFromReg(subPath, name string) (string, error) {
	// First, try to read from LocalMachine hive
	key, err := winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, subPath, winreg.QUERY_VALUE)
	if err == nil {
		defer key.Close()
		value, _, err := key.GetStringValue(name)
		if err == nil {
			return value, nil
		}
	}

	// If that fails, try to read from CurrentUser hive
	key, err = winreg.OpenKey(winreg.HKEY_CURRENT_USER, subPath, winreg.QUERY_VALUE)
	if err == nil {
		defer key.Close()
		value, _, err := key.GetStringValue(name)
		if err == nil {
			return value, nil
		}
	}

	return "", err
}

报错怎么解决

D:\ChromeDownloader>wxapkg_1.5.0_windows_amd64.exe scan
Caught panic:

runtime error: index out of range [0] with length 0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
github.com/charmbracelet/[email protected]/tea.go:440 +0x95
panic({0xee9bc0, 0xc0000208e8})
runtime/panic.go:890 +0x262
github.com/wux1an/wxapkg/cmd.(*scanTui).renderDetail(0x12fd8a0?)
github.com/wux1an/wxapkg/cmd/scan-tui.go:123 +0x805
github.com/wux1an/wxapkg/cmd.(*scanTui).View(0xc000198000)
github.com/wux1an/wxapkg/cmd/scan-tui.go:176 +0x12e
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00019a000)
github.com/charmbracelet/[email protected]/tea.go:487 +0x6f5
github.com/wux1an/wxapkg/cmd.glob..func1(0x12f7640?, {0xf0f652?, 0x0?, 0x0?})
github.com/wux1an/wxapkg/cmd/scan.go:51 +0x1cc

小程序解包卡住

如题,使用scan解包发现卡死,等待超过半小时:
image
然后尝试使用unpack命令同样卡死,但指定不美化则很快解包成功,尝试增加线程数也没用:
image

detail.json无内容

我下载了exe文件使用,但他不能完全识别电脑中缓存的微信小程序:如图:
image
这些识别不了的小程序在unpack后detail.json为空:
image
请问怎么解决呢?

__wxprivate__下找不到.wxapkg

wxapkg_1.5.0_windows_amd64.exe scan -r "D:\weixin\files\WeChat Files\wxid_7rqr5gp8ic3l22\Applet"
[+] unpack root 'D:\weixin\files\WeChat Files\wxid_7rqr5gp8ic3l22\Applet\wxada4175c8b2a9864' with 30 threads
no '.wxapkg' file found in 'D:\weixin\files\WeChat Files\wxid_7rqr5gp8ic3l22\Applet\wxada4175c8b2a9864_wxprivate_'

open %USERPROFILE%\Documents\WeChat Files\Applet: The system cannot find the path specified.

Hi, I tried this app, but I got the following errors. It seemed the Applet path is hardcoded in the app, I tried to make this work via created a directory link via cd C:\Users\Liu.D.H\Documents && mklink /J "WeChat Files" "D:\Documents\WeChat Files", but provide a cli option would be a nice solution.

> D:\Downloads\wxapkg_1.5.0_windows_amd64.exe scan
open C:\Users\Liu.D.H\Documents\WeChat Files\Applet: The system cannot find the path specified.

> D:\Downloads\wxapkg_1.5.0_windows_amd64.exe --help
A tool to scan and decrypt wechat mini program

Usage:
  wxapkg [command]

Available Commands:
  help        Help about any command
  scan        Scan the wechat mini program
  unpack      Decrypt wechat mini program

Flags:
      --disable-beautify   disable js,html,json beautify
  -h, --help               help for wxapkg
  -v, --version            version for wxapkg

Use "wxapkg [command] --help" for more information about a command.

>

无法解析

error: 暂未收录 appid 为: wx39fef30273f9b8c0的小程序

error: invalid character '<' looking for beginning of value

命令:.\wxapkg_1.5.0_windows_amd64.exe scan -r "F:\wx\Weixin\WeChat Files\Applet"
能够读取到小程序,但是不完全。
shell窗口内容如下,此时选择是的市空白行内容。
█████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ Name Developer Description
┃────────────────────────────────────────────
┃ 搜狗号码通 北京搜狗科技发展有限公司 搜狗号码通专注号码识别,拥有业内
┃ 微墙报 北京光因科技有限公司 微墙报是北京光因科技有限公司开发

┃ CSDN 北京创新乐知网络技术有限公司 用来为广大开发者提供对应技术分享

┃ 美团外卖丨外卖美食… 北京三快在线科技有限公司 美团外卖,送啥都快!附近美食、早
┃ 拼多多 上海寻梦信息技术有限公司 拼多多,多实惠,多乐趣。
┃ 同程旅行订酒店机票… 同程网络科技股份有限公司 同程旅游官方小程序,提供飞机票、

┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error: invalid character '<' looking for beginning of value
Location: F:\wx\Weixin\WeChat Files\Applet\wx430320811ad90e5f
All information see '.\wxid.json'

enter unpack • ↑/k move up • ↓/j move down • q exit

需要安装依赖吗

为什么我直接用scan或者unpack解出来的包只有plugin.js或plugin.json,用wuWxapkg.js反编译的话解出来的文件明显比较多,是缺少什么东西了么

可以解小程序包,但是解包不完整

提示app.json app.js未找到,
部分文件内容只是框架 没内容
比如:
`// pages/center/index.js
Page({

/**

  • 页面的初始数据
    */
    data: {

},

/**

  • 生命周期函数--监听页面加载
    */
    onLoad(options) {

},

/**

  • 生命周期函数--监听页面初次渲染完成
    */
    onReady() {

},

/**

  • 生命周期函数--监听页面显示
    */
    onShow() {

},

/**

  • 生命周期函数--监听页面隐藏
    */
    onHide() {

},

/**

  • 生命周期函数--监听页面卸载
    */
    onUnload() {

},

/**

  • 页面相关事件处理函数--监听用户下拉动作
    */
    onPullDownRefresh() {

},

/**

  • 页面上拉触底事件的处理函数
    */
    onReachBottom() {

},

/**

  • 用户点击右上角分享
    */
    onShareAppMessage() {

}
})`

cmd中运行异常

您好,我打开小程序后,在微信默认的路径上cmd,然后执行wxapkg.exe scan 黑窗口会直接卡消失,这是神马情况

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.