Coder Social home page Coder Social logo

corona-archiver's Introduction

GitHub Release GitHub Issues or Pull Requests GitHub Downloads (all assets, all releases)

Corona Archiver | Solar2D Game Engine pack/unpack

Python script to help pack and unpack Corona archive .car file

Distribution

Windows binary (.exe)

https://github.com/0BuRner/corona-archiver/releases

Usage

Unpacking

Usage: corona-archiver.py -u 'input_file' 'output_dir'

example: corona-archiver.py -u /home/0burner/resources.car /home/0burner/decompiled/

Packing

Usage: corona-archiver.py -p 'input_dir' 'output_file'

example: corona-archiver.py -p /home/0burner/decompiled/ /home/0burner/new_recompiled.car

File structure

[header]
    [magic_number] (4 bytes) \x72\x61\x63\x01
    [revision] (4 bytes)
    [data_offset_start] (4 bytes)
    [index_size] (4 bytes)

[index]
    [entry]
        [entry_type] (4 bytes) 1
        [data_offset] (4 bytes)
        [filename_length] (4 bytes)
        [filename] (filename_length+1 bytes) 0-terminated
        [padding] (1|2|3|4 bytes) \x00

[data]
    [entry]
        [entry_type] (4 bytes) 2
        [next_data_offset] (4 bytes)
        [file_size] (4 bytes)
        [file_content] (file_size bytes)
        [padding] (0|1|2|3 bytes) \x00

[end]
    [magic_number] (4 bytes) \xFF\xFF\xFF\xFF
    [padding] (4 bytes) \x00

Others languages

LUA

LUA Decompilers

LUA Tools

Tutorials

Dissasembling

corona-archiver's People

Contributors

0burner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corona-archiver's Issues

Not Working!

Hi. i don't know how to tnx for this tool! it's really good but it's not working anymore :(
Here it't log :
Traceback (most recent call last):
File "corona-archiver.py", line 238, in
File "corona-archiver.py", line 104, in unpack
File "corona-archiver.py", line 194, in _read_data_idx
File "corona-archiver.py", line 186, in _read_data_entry
File "corona-archiver.py", line 215, in _write_data_entry
FileNotFoundError: [Errno 2] No such file or directory: 'out\Scenes.TribeManager.lu'
[4412] Failed to execute script corona-archiver

It is not working now

how we can reverse engineer the libcorona.so to find how does it unpack the resource.car file?
or can we hook libcorona with frida or xposed?

problem unpacking resource.car

Hello,
Thank you for creating this programm. I have a problem unpacking a car file.
I tried python versions 2.7.16 and 3.7 but the unpacking proccess ends up with error:
Traceback (most recent call last): File "C:\corona-archiver-master\corona-archiver.py", line 238, in <module> archiver.unpack(input_file=input, output_dir=os.path.join(output, '')) File "C:\corona-archiver-master\corona-archiver.py", line 104, in unpack self._read_data_idx() File "C:\corona-archiver-master\corona-archiver.py", line 194, in _read_data_idx self._read_data_entry(offset, filename, True, True) File "C:\corona-archiver-master\corona-archiver.py", line 186, in _read_data_entry self._write_data_entry(content, offset if offset else self.stream.tell(), filename) File "C:\corona-archiver-master\corona-archiver.py", line 211, in _write_data_entry new_filename = str(filename, 'utf-8') TypeError: str() takes at most 1 argument (2 given)

Doesn't save with original .lu file names

When i run the program, it doesn't unpack the files to their original file names. Instead file names look like this file-offset.extracted. Would be cool if you made it unpack each file with its original name.

Run with command-line arguments

Be able to launch the script via commandline.
Arguments should be:

  • action (pack | unpack)

  • verbosity

  • Unpack

    • input file
    • output dir
    • method (index | stream)
  • Pack

    • input dir
    • output file

Can't pack lua back to resource.car

As title
I pack lua back to resource.car, the resource.car file is only 1kb (original file is 236)
Even I didn't edit those lua files, then just pack back, it's still 1 kb.

Help!

Why do I run in python 3.9, and then I use quotation marks for two parameters, and then It report the wrong?

help with decompiling/decrypting

Hi, thanks for this awesome tool.

After unpacking I got these .lu files, but it seems that they are encrypted or compiled.

I've tried a decompiler but it said invalid header, so I'm guessing they are encrypted.

Do you happen to have any information about it?

how it work :)

hello, thank you for this script I followed your guide
#3

this is the file https://www.dropbox.com/s/7zhun4omdyj1yaj/resource.car?dl=0

I'm using python 2.7.16

I get this error is there something wrong with my command

C:\Users\HOUSSAM\Desktop\corona-archiver-master>python corona-archiver.py -u C:
temp\resource.car C:\temp\unpacked
Traceback (most recent call last):
File "corona-archiver.py", line 238, in
archiver.unpack(input_file=input, output_dir=os.path.join(output, ''))
File "corona-archiver.py", line 104, in unpack
self._read_data_idx()
File "corona-archiver.py", line 194, in _read_data_idx
self._read_data_entry(offset, filename, True, True)
File "corona-archiver.py", line 186, in _read_data_entry
self._write_data_entry(content, offset if offset else self.stream.tell(), fi
lename)
File "corona-archiver.py", line 211, in _write_data_entry
new_filename = str(filename, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)

Rebuild .car based on initial .car file

The goal is to be able to have almost exactly the same file before and after unpacking and packing back.
For now, the files are written in random order in the resulting file. So the initial and resulting .car file are not identical.

Help with unpacking & decompiling

hello,
i can't use it, i have python 3.6.4 and when write command line with cmd i get error "Syntax Error: invalid syntax"
and i installed 2.7 and when write command line like this "corona-archiver.py -u resource.car C:\corona-archiver" i get msg "Extraction done" but i not find anything in folder,
please help me to fix it and what problem, in python version or i write command wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.