Skip to content

import labeless failed #65

@HongThatCong

Description

@HongThatCong

The same bug happened to me as #62

After debugging, using IDA and ProcMon, with the exe being debugged are x32dbg and x64dbg, I found the "import site" Python statement line had no effect.

I patched the labeless plugin for x32dbg and x64dbg to "import site; site.main()" but it still failed

PyRun_SimpleStringFlags "import labeless" still fails. Still returns 0, "ModuleNotFound" exception str return
Procmon watch shows: Lib\site-packages dir is not added to sys.path so when "import labeless" will not find the Lib\site-packages\labless directory (which was installed before using release .whl files)
I worked around by explicitly pointing Lib\site-packages dir in the python311._pth file (on my machine) and everything is OK. Labeless imported successfully
I used this method for both Python 3.11 x86 and x64,
and tested OK with OllyDbg1, OllyDbg2, x32dbg and x64dbg.

I still don't know why Lib\site-packages is not added to sys.path
It might be due to some Python Flags

PS: another way to temproray fix is move labeless and google dir from Lib\site-packages to Lib\

Thank you for this great plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions