vilsol / ue4pak Goto Github PK
View Code? Open in Web Editor NEWue4pak parses and extracts data from UE4 Pak files
License: GNU General Public License v3.0
ue4pak parses and extracts data from UE4 Pak files
License: GNU General Public License v3.0
paks, err := filepath.Glob("paks/*.pak")
if err != nil {
panic(err)
}
for _, f := range paks {
fmt.Println("Parsing file:", f)
file, err := os.OpenFile(f, os.O_RDONLY, 0644)
if err != nil {
panic(err)
}
p := parser.NewParser(file)
pak, err := p.Parse()
if err != nil {
panic(err)
}
summaries := make(map[string]*parser.FPackageFileSummary)
for _, record := range pak.Index.Records {
fmt.Println("Parsing file:", record.FileName)
if !strings.Contains(record.FileName, ".uasset") {
continue
}
content := record.ReadUAsset(pak, p)
fmt.Println("Content:", content.FolderName)
summaries[content.FolderName] = content
}
When I run the command to show the class tree for the one pak file in a UE4 game I got off Steam, your program throws an error. The console dump is below:
C:\Users\liljm\Downloads\ue4pak>ue4pak.exe --colors class-tree -p "D:\Games\Steam\steamapps\common\Arcade Redemption\TokensOnly\Content\Paks\TokensOnly-WindowsNoEditor.pak"
2022-03-13T11:51:53-05:00 INF Parsing file: D:\Games\Steam\steamapps\common\Arcade Redemption\TokensOnly\Content\Paks\TokensOnly-WindowsNoEditor.pak
panic: End of stream: 221 < 1071182703
goroutine 1 [running]:
github.com/Vilsol/ue4pak/parser.(*PakParser).Read(0xc00005a0c0, 0x40000000)
/home/runner/work/ue4pak/ue4pak/parser/parser.go:95 +0x219
github.com/Vilsol/ue4pak/parser.(*PakParser).ReadString(0xc00007c070)
/home/runner/work/ue4pak/ue4pak/parser/parser_basic.go:21 +0x51
github.com/Vilsol/ue4pak/parser.(*PakParser).DecodeFPakEntry(0xc0000cd988, 0xc00007c070, 0x8)
/home/runner/work/ue4pak/ue4pak/parser/parser_pak.go:254 +0x2b
github.com/Vilsol/ue4pak/parser.(*PakParser).DecodeLegacyPakEntries(0xb1d600, 0xc00001c120, 0xc00005a100)
/home/runner/work/ue4pak/ue4pak/parser/parser_pak.go:248 +0x73
github.com/Vilsol/ue4pak/parser.(*PakParser).Parse(0xc00005a0c0, {0xbd5080, 0xc00001c0f0})
/home/runner/work/ue4pak/ue4pak/parser/parser_pak.go:66 +0x425
github.com/Vilsol/ue4pak/parser.(*PakParser).ProcessPak(0xc00005a0c0, {0xbd5080, 0xc00001c0f0}, 0x0, 0xc000093d88)
/home/runner/work/ue4pak/ue4pak/parser/parser_types.go:12 +0x5e
github.com/Vilsol/ue4pak/cmd.glob..func1(0xddcb00, {0xb55e15, 0x3, 0x3})
/home/runner/work/ue4pak/ue4pak/cmd/class-tree.go:62 +0x345
github.com/spf13/cobra.(*Command).execute(0xddcb00, {0xc0000c5fb0, 0x3, 0x3})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xddc880)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/Vilsol/ue4pak/cmd.Execute()
/home/runner/work/ue4pak/ue4pak/cmd/root.go:40 +0x25
main.main()
/home/runner/work/ue4pak/ue4pak/main.go:6 +0x17
Can anyone help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.