From ca0ff819626c03af7c7b9323338da681743994b6 Mon Sep 17 00:00:00 2001 From: Connor Edwards <38229097+cedws@users.noreply.github.com> Date: Sat, 8 Apr 2023 19:35:46 +0100 Subject: [PATCH] Rename project --- .gitignore | 4 ++-- Makefile | 6 +++--- README.md | 20 ++++++++++++++++---- cmd/eject.go | 2 +- cmd/inject.go | 2 +- cmd/root.go | 2 +- go.mod | 2 +- keyring/keyring.go | 2 +- main.go | 2 +- 9 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 74431c2..746b9bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -pubkey-extract -pubkey-extract.exe \ No newline at end of file +ki-keyring +ki-keyring.exe \ No newline at end of file diff --git a/Makefile b/Makefile index f3ad440..ec9d827 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ all: release .PHONY: release release: mkdir -p bin - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/pubkey-extract-windows-amd64.exe $(GOFLAGS) - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/pubkey-extract-linux-amd64 $(GOFLAGS) - CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o bin/pubkey-extract-darwin-arm64 $(GOFLAGS) + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/ki-keyring-windows-amd64.exe $(GOFLAGS) + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/ki-keyring-linux-amd64 $(GOFLAGS) + CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o bin/ki-keyring-darwin-arm64 $(GOFLAGS) .PHONY: clean clean: diff --git a/README.md b/README.md index a2480f9..e091ed7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,23 @@ -# pubkey-extract -Extracts obfuscated public keys from WizardGraphicalClient binaries. It can also generate new RSA keypairs and inject them into the game client. All output is in JSON format. +# ki-keyring + +Utility for ejecting/injecting sets of obfuscated public keys ("keyring" structures) from/into WizardGraphicalClient binaries. ## Usage +It assumes the game client is located at the default Windows installation path but it can be overridden with `--bin`. + +The `eject` subcommand will print the keyring of the game client in JSON format. The `private` field for each key in the keyring will be set to `null` as this information isn't obtainable. +```sh +$ ki-keyring eject +{...} +$ ki-keyring eject --bin path/to/WizardGraphicalClient.exe +{...} +``` + +The `inject` subcommand will generate new RSA keypairs and inject the public keys into the game client. The `private` field for each key in the keyring will also reflect the new RSA private keys. ```sh -$ pubkey-extract +$ ki-keyring inject {...} -$ pubkey-extract inject --bin path/to/WizardGraphicalClient.exe +$ ki-keyring inject --bin path/to/WizardGraphicalClient.exe {...} ``` diff --git a/cmd/eject.go b/cmd/eject.go index 753785f..8e204b0 100644 --- a/cmd/eject.go +++ b/cmd/eject.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/cedws/pubkey-extract/keyring" + "github.com/cedws/ki-keyring/keyring" "github.com/spf13/cobra" ) diff --git a/cmd/inject.go b/cmd/inject.go index b9e52ce..41ec7a7 100644 --- a/cmd/inject.go +++ b/cmd/inject.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/cedws/pubkey-extract/keyring" + "github.com/cedws/ki-keyring/keyring" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index 5131769..83d2d82 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/cedws/pubkey-extract/keyring" + "github.com/cedws/ki-keyring/keyring" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 3a1a34c..0af6159 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cedws/pubkey-extract +module github.com/cedws/ki-keyring go 1.19 diff --git a/keyring/keyring.go b/keyring/keyring.go index c3977a1..80cd0c5 100644 --- a/keyring/keyring.go +++ b/keyring/keyring.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" - "github.com/cedws/pubkey-extract/scan" + "github.com/cedws/ki-keyring/scan" peparser "github.com/saferwall/pe" "golang.org/x/arch/x86/x86asm" ) diff --git a/main.go b/main.go index adce7db..8dd4770 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/cedws/pubkey-extract/cmd" + "github.com/cedws/ki-keyring/cmd" ) func main() {