-
Notifications
You must be signed in to change notification settings - Fork 756
Getting Started
This guide provides a basic introduction to using the Qiling Framework to emulate a simple program.
Let's start by emulating a simple "Hello, World!" program for Linux. First, create a file named hello.c with the following content:
#include <stdio.h>
int main() {
printf("Hello, Qiling!\n");
return 0;
}Compile this program for Linux x86_64:
gcc -o hello hello.cNow, create a Python script named emulate_hello.py to emulate this binary:
from qiling import Qiling
if __name__ == "__main__":
# Initialize Qiling with the path to the binary and the rootfs
ql = Qiling(["hello"], "/path/to/your/rootfs/x8664_linux")
# Run the emulation
ql.run()Replace /path/to/your/rootfs/x8664_linux with the actual path to your root filesystem. You can download pre-built root filesystems from the Qiling releases page.
Execute the Python script:
python emulate_hello.pyYou should see the following output:
Hello, Qiling!
This demonstrates the basic workflow of using Qiling to emulate a binary. From here, you can explore more advanced features like hooking, debugging, and interacting with the emulated environment.
- Home
- Getting Started
- Core Concepts
- Usage
- Features
- Tutorials
- Development
- Resources