Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 distutils deprecated package #1454

Open
ScraperMan2002 opened this issue Mar 4, 2024 · 1 comment
Open

Python 3.12 distutils deprecated package #1454

ScraperMan2002 opened this issue Mar 4, 2024 · 1 comment

Comments

@ScraperMan2002
Copy link

ScraperMan2002 commented Mar 4, 2024

*Description
When importing and using qiling in a python file compiled using Python 3.12, a bug appears that says something along the lines as distutils cannot be found. This is because in Python 3.12 distutils is deprecated.

Sample Code

from qiling import Qiling
from qiling.const import QL_VERBOSE

if __name__ == "__main__":
    # set up command line argv, emulated os root path, os default profile, and verboseness level.
    argv = r"hello".split()
    rootfs = r"rootfs/arm64_linux"
    profile = "linux.ql"
    verboseness = QL_VERBOSE.DEBUG

    # instantiate a Qiling object using above arguments;
    # additional settings are read from profile file
    ql = Qiling(argv, rootfs, verbose=verboseness, profile=profile)

    # https://docs.qiling.io/en/latest/debugger/
    # ql.debugger = True

    # https://docs.qiling.io/en/latest/register/
    # https://docs.qiling.io/en/latest/memory/

    ql.run()

Expected output

[+] 	Profile: linux.ql
[+] 	Mapped 0x400000-0x401000
[+] 	Mapped 0x410000-0x411000
[+] 	mem_start : 0x400000
[+] 	mem_end  : 0x411000
[+] 	mmap_address is : 0x7fffb7dd6000
[+] 	Received interrupt: 0x2
[+] 	write() CONTENT: b'Hey folks\n'
Hey folks
[+] 	0x0000000000400014: write(fd = 0x1, buf = 0x410030, count = 0xa) = 0xa
[+] 	Received interrupt: 0x2
[+] 	0x0000000000400020: exit(code = 0x0) = ?
[+] 	
[+] 	syscalls called
[+] 	------------------------
[+] 	ql_syscall_write:
[+] 	 {"params": {"fd": 1, "buf": 4259888, "count": 10}, "retval": 10, "address": 4194324, "retaddr": null, "position": 0}
[+] 	ql_syscall_exit:
[+] 	 {"params": {"code": 0}, "retval": null, "address": 4194336, "retaddr": null, "position": 1}
[+] 	
[+] 	strings ocurrences
[+] 	------------------------
@elicn
Copy link
Member

elicn commented Mar 5, 2024

Hi there,
Can you please be more specific about the error you are seeing?
I can't find any package required by Qiling that depends on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants