Comments (3)
Thanks for the report.
The fix you proposed wouldn't fix the root of the issue,
which is probably a false flag detection.
I will look into it in the coming days.
from unitypy.
I noticed that the data in question is compressed via lzma.FORMAT_ALONE which is the legacy lzma format.
So I checked how the properties are encoded in that format and found the following code
void DecodeProperties(const Byte *properties)
{
unsigned d = properties[0];
if (d >= (9 * 5 * 5))
throw "Incorrect LZMA properties";
lc = d % 9;
d /= 9;
pb = d / 5;
lp = d % 5;
dictSizeInProperties = 0;
for (int i = 0; i < 4; i++)
dictSizeInProperties |= (UInt32)properties[i + 1] << (8 * i);
dictSize = dictSizeInProperties;
if (dictSize < LZMA_DIC_MIN)
dictSize = LZMA_DIC_MIN;
}
which is pretty much the same as the current python code besides the min dict size.
So it's better to simply use lzma.decompress(data, format = lzma.FORMAT_ALONE) .
I'm going to run some tests now to confirm this.
from unitypy.
Hm,
according to my tests it's not exactly the same.
I found a good way to identify the compression format tho.
When the ALONE format is used, data[5] equals 255,
if the specific compressor is used, it equals 0.
I'm going to run some further tests and so how it goes with that.
from unitypy.
Related Issues (20)
- AttributeError: 'NodeHelper' object has no attribute 'name' HOT 3
- Run code using Android HOT 1
- ContainerHelper does not look right that .container returns None
- can't read typetree from assets HOT 2
- Unable to extract Unity 2022.03.7f1 Texture2D correctly HOT 1
- Reading typetree error: Can't read 4 bytes at position 32 of 32 HOT 1
- Unable to load APK files directly HOT 1
- Flip operation for packed sprite are reversed
- Load dependencies with sensitive paths HOT 2
- Crashes when reading RGB24 Texture2D HOT 2
- Segmentation fault when unpacking DXT5Crunched texture HOT 5
- wishlist: support "bundle"/"bank"? HOT 1
- AudioClip can not be exported. What does the FmodError : MEMORY mean?? HOT 2
- Is Windows SDK required for installing UnityPy? HOT 3
- Please add support for Texture2DArray
- Texture2D 2022.2 bug HOT 6
- error when exporting mesh_renderer
- Saving files bigger than 4GB HOT 2
- Edit Texture2D make file corrupted HOT 9
- .save_typetree() MonoBehaviour function not working.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitypy.