mirror of
https://github.com/wux1an/wxapkg.git
synced 2025-12-24 12:47:52 +08:00
doc: add demo
This commit is contained in:
17
README.md
17
README.md
@@ -1,7 +1,17 @@
|
||||
# wxapkg
|
||||
|
||||
**Install:**
|
||||
|
||||
Download the latest [release](https://github.com/wux1an/wxapkg/releases/latest) or build with `go install` by yourself
|
||||
|
||||
```
|
||||
go install github.com/wux1an/wxapkg@latest
|
||||
```
|
||||
|
||||
**Usage:**
|
||||
|
||||

|
||||
|
||||
- scan mini program
|
||||
|
||||
```bash
|
||||
@@ -26,6 +36,7 @@
|
||||
|
||||
**References:**
|
||||
|
||||
1. decrypt: https://github.com/BlackTrace/pc_wxapkg_decrypt
|
||||
2. unpack: https://gist.github.com/Integ/bcac5c21de5ea35b63b3db2c725f07ad
|
||||
3. introduce: https://misakikata.github.io/2021/03/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%A7%A3%E5%8C%85/
|
||||
- decrypt: https://github.com/BlackTrace/pc_wxapkg_decrypt
|
||||
- unpack: [https://gist.github.com/Integ/bcac5c21de5ea3...](https://gist.github.com/Integ/bcac5c21de5ea35b63b3db2c725f07ad)
|
||||
- introduce: [https://misakikata.github.io/2021/03/%E5%BE%...](https://misakikata.github.io/2021/03/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%A7%A3%E5%8C%85/)
|
||||
- terminal ui: https://github.com/charmbracelet/bubbletea
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "wxapkg",
|
||||
Short: "A tool to scan and decrypt wechat mini program",
|
||||
CompletionOptions: cobra.CompletionOptions{
|
||||
@@ -15,7 +15,7 @@ var rootCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
err := rootCmd.Execute()
|
||||
err := RootCmd.Execute()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/fatih/color"
|
||||
"github.com/wux1an/wxapkg/util"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"wxapkg/util"
|
||||
)
|
||||
|
||||
var baseStyle = lipgloss.NewStyle().
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/fatih/color"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/wux1an/wxapkg/util"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"wxapkg/util"
|
||||
)
|
||||
|
||||
var scanCmd = &cobra.Command{
|
||||
@@ -66,7 +66,7 @@ var scanCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(scanCmd)
|
||||
RootCmd.AddCommand(scanCmd)
|
||||
|
||||
var homeDir, _ = os.UserHomeDir()
|
||||
var defaultRoot = filepath.Join(homeDir, "Documents/WeChat Files/Applet")
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tidwall/pretty"
|
||||
"github.com/wux1an/wxapkg/util"
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
"io"
|
||||
"log"
|
||||
@@ -19,7 +20,6 @@ import (
|
||||
"regexp"
|
||||
"sort"
|
||||
"sync"
|
||||
"wxapkg/util"
|
||||
)
|
||||
|
||||
var programName = filepath.Base(os.Args[0])
|
||||
@@ -258,7 +258,7 @@ func decryptFile(wxid, wxapkgPath string) []byte {
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(unpackCmd)
|
||||
RootCmd.AddCommand(unpackCmd)
|
||||
|
||||
var homeDir, _ = os.UserHomeDir()
|
||||
var defaultRoot = filepath.Join(homeDir, "Documents/WeChat Files/Applet", "wx00000000000000")
|
||||
|
||||
Reference in New Issue
Block a user