Python 3.12 distutils deprecated package

Aperta
#1,454 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start by running the sample import and Qiling initialization under Python 3.12, then search the project for distutils usage or dependency declarations. Done means Qiling imports and the provided emulation example runs under Python 3.12 without the missing-distutils error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

*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
[+] 	------------------------
Lingua principale
Python
Stelle
6.2k
Fork
806
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qilingframework/qiling

Tutte le issue di qilingframework/qiling

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.