Linuxrun is a tool designed to convert Windows PE (Portable Executable) files into Linux ELF (Executable and Linkable Format) executables. This tool disassembles Windows executables, processes the assembly, and assembles and links the resulting code to create a runnable ELF file on Linux systems.
- Validates PE headers to ensure input files are executable.
- Disassembles PE files using
ndisasm
. - Writes a complete ELF header and section header.
- Assembles the disassembled code using
nasm
. - Links the object file into an ELF executable using
ld
.
- Linux: The tool is developed for Linux environments.
- Tools:
gcc
: The GNU Compiler Collection.nasm
: An assembler for x86 architectures.ndisasm
: A disassembler for x86/x64 code.ld
: The GNU linker.
You can install these tools using your package manager. For example, on Debian-based systems:
sudo apt-get install gcc nasm binutils
- Clone the repository or download the source code:
git clone https://github.com/voltageddebunked/linuxrun.git
cd Linuxrun
- Compile the program:
bash compile.sh
To convert a Windows executable to a Linux ELF executable, run the following command:
./main <input_exe> <output_elf>
Example:
./main example.exe output.elf
This command will:
- Validate the PE file.
- Disassemble
example.exe
into an assembly file (disassembled.asm
). - Generate an ELF header and section for
output.elf
. - Assemble the disassembled code into an object file (
output.o
). - Link
output.o
intooutput.elf
.
Contributions are welcome! If you'd like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the GPL 3.0 License - see the LICENSE file for details. This software is fully free, open source and fully open to anyone, you can make money off of it, you can resell it, you can use it for work, and any circumstance as long as its legal.
For questions or suggestions, please open an issue in the repository or contact me at [[email protected]].