Background cronjob for gakumasu-diff and gkms-webdata.
Important
This program is not designed for any evil purpose however according to the way it works, it can be, just like any other technologies, altered for malicious intention. We choose to make it open source because we believe the innovation and creativity of the whole great open source community can create something amazing based on it. The developers of the project hereby declare that we strongly oppose any malicious uses against the original purpose. Please always remember it's not the technology itself does the harm, it's the people wielding it.
You can choose to build from source on your own or utilize our pre-built docker image to use.
go mod download
env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=gcc go build -ldflags '-s -w' .
Some dependencies require CGO enabled. According to your developing environment, you may need to change GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc
or other related environment variables, please refer to the documentation for detailed information.
Required dependencies are listed in go.mod
.
Get our pre-built docker image from https://github.com/vertesan/campus/pkgs/container/campus.
You must create an empty file named config.yaml
and an empty directory named cache
in advance if they don't exist.
touch config.yaml
mkdir cache
After that run docker compose up
to see the results. By default the container run with an option -h
to print the CLI instructions and returns, you can change this behaviour to fit your needs by editing compose.yaml
.
After building the executable, run ./campus -h
to get instructions. Here is a glimpse.
Usage of ./campus:
-ab
Download and deobfuscate assetbundles if true.
Deobfuscated files are saved in 'cache/assets' directory.
-analyze
Analyze dump.cs to retrieve proto schema.
Generated codes are saved in 'cache/GeneratedProto' directory.
-db
Download and decrypt master database if true.
Generated yaml files are saved in 'cache/masterYaml' directory.
-forceab
Download assetbundles without checking version.
Takes no effect if 'ab' is absent.
It's safe to set this flag to true if you only want to download a part of additional assets instead of the entire bulky thing because MD5 check will still be carried out before downloading.
-forcedb
Download and decrypt master database without checking local version.
Take no effect if 'db' flag is absent.
-keepab
Do not delete obfuscated assetbundle files after deobfuscating.
Take no effect if 'ab' flag is absent.
-keepdb
Do not delete encrypted master database files after decrypting.
Take no effect if 'db' flag is absent.
-token string
The refresh token used to retrieve login idToken from firebase.
If refreshToken field set in 'config.yaml' is not empty, the value in the config file will take precedence.
To make campus work properly, you must hand over your firebase refresh token as an option at the first run. After that your token will be saved in ./config.yaml
for subsequent use so that you can omit adding token from then on.
P.S. To get the firebase refresh token you will need to find a way to intercept the HTTPS traffic and that is not the content of this README.
Warning
Never use your main account token if it is precious to you. There is no guarantee that our behaviors cannot be detected by the official team.
After the first successful run, a config.yaml
will be automatically created in the root directory. You can safely edit it if you want to tweak something manually.
cronjob.sh
: A cronjob script for a certain repositorypush_master.sh
: A post process script running aftercronjob.sh
analyze.sh
: Analyze the latest proto schema fromdump.cs
and automatically update the files inside./proto
unpack.py
: Unpack images from Unity assetbundle format to PNG
AGPL-3.0 license
Thanks this article for offering lots of clues so that we can make everything possible.