A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dashingsoft/pyarmor/issues/2139 below:

[BUG] `NULL object passed to Py_BuildValue` · Issue #2139 · dashingsoft/pyarmor · GitHub

I perform the obfuscation using --enable-bcc
Windows 11
python 3.13
pyarmor 9.1.5

Test code (structure like my main code where I catch an error) and simplified in test2() also with an error

import traceback

class CustomException(Exception): pass
class CustomException2(Exception): pass

def test1():
    try:
        for i in range(3):
            with open("temp1.temp", "wb") as f:
                try:
                    for i in range(3):
                        with open("temp2.temp", "wb") as f:
                            try: 1/0
                            except SystemExit: print("obfuscate SystemExit"); raise SystemExit()
                            except:
                                index = 1
                                raise CustomException(f"test {index}")
                except CustomException:
                    raise CustomException2(f"!!!")
        return 11
    except SystemExit: raise SystemExit()
    except Exception as e: print(e)

def test2():
    try:
        with open("temp2.temp", "wb") as f:
            try: 1/0
            except: raise Exception
    except Exception as e:
        print(e)
        traceback.print_exc()

test2()

There has to be a conclusion:
ZeroDivisionError: division by zero

Output after obfuscation:

NULL object passed to Py_BuildValue
NoneType: None

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4