Skip to content

chenzhch/xbash

Repository files navigation

xbash

Converting bash scripts to C code tools

Install

You can use the pre-built executable directly, or compile from source as follows:

tar xvf bash-5.2.37.tar.gz
cp command.h execute_cmd.c shell.c  ./bash-5.2.37 
cd bash-5.2.37
./configure
make
mv bash xbash

Use

chmod +x xbash
tar xvf bash-5.2.37.tar.gz
cd bash-5.2.37
./configure LDFLAGS="-static"
Modify BASHDIR and XBASH in the make.sh file to point to actual values

Compile the script and generate binary files

sh make.sh example.sh

It is recommended to use -static static compilation and strip to remove the symbol table, which increases the difficulty of reverse engineering. It is recommended to conduct comprehensive testing on the compiled program to prevent production failures.

Execute binary files

./example.sh.x

Features

  • Converted to C code, will not revert back to the original script code during execution

  • Generate independent executable programs that do not rely on the bash interpreter

  • Resolve decrypt All cracking methods

Software

bash-5.2.37.tar.gz Bash source code, available from bash Download from the official website, version 5.2.37.

xbash_android_v7a Android version

xbash_linux_x86_64 LINUX x86 64 bit version

xbash_linux_arm_64 LINUX arm 64 bit version

xbash_macOS_11.7.9_x86_64 MacOS 64 bit version

xbash_aix_7.1.3 Aix 64 bit version

History

  • 2026-05-10 tag 1.4

    Open Source

  • 2025-08-24 tag 1.3

    Fixed double free bug

  • 2025-08-09 tag 1.2

    Fixed 0 byte xmalloc bug

  • 2025-05-18 tag 1.1

    Add string encryption

  • 2025-02-05 tag 1.0

    Fixed core dump

  • 2024-12-06

    Initial version

About

Tool for converting bash scripts into C code

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors