libhijacker icon indicating copy to clipboard operation
libhijacker copied to clipboard

(v1.116) BrokenPipeError: [Errno 32] Broken pipe

Open Goon3r opened this issue 1 year ago • 2 comments

Hello,

Operating System: MacOS Monteray 12.6 Python: 3.116 aiofiles: 23.2.1 libhijacker: 1.116

When running the send_elf.py script the following is output in the terminal before exiting:

python3 send_elf.py <ps5_ip>
/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py: start
has_daemon: False
start send_spawner(args)
Traceback (most recent call last):
  File "~/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py", line 375, in <module>
    main()
  File "~/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py", line 369, in main
    asyncio.run(run_loggers(args))
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "~/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py", line 295, in run_loggers
    await send_spawner(args)
  File "~/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py", line 268, in send_spawner
    await logger_client(args)
  File "~/Goon3r/PS5/libhijacker_1.116-01407445/send_elf.py", line 254, in logger_client
    await writer.drain()
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/streams.py", line 377, in drain
    await self._protocol._drain_helper()
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/streams.py", line 172, in _drain_helper
    await waiter
  File "/usr/local/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/selector_events.py", line 1082, in _write_ready
    n = self._sock.send(self._buffer)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [Errno 32] Broken pipe

Despite the script exiting, I do see debug notifications display on the PS5. I forgot to note the first ones seen but one subsequent calls it shows "libhijacker spawner main entered"

Having tested, the FTP server is also running and can be connected to despite the script failure.

Can you adivse please?

Thanks, Goon3r

Goon3r avatar Oct 12 '23 20:10 Goon3r

Try commenting out line 254

illusion0001 avatar Oct 12 '23 22:10 illusion0001

Try commenting out line 254

This doen't solve the problem.

Try adding try statement at 248, like below.

async def logger_client(args: ParsedArgs):
    async with SEM:
        try:
            async with open_connection(args.host, LOGGER_PORT) as (reader, writer):
                reader._buffer = LineBuffer(reader._buffer)
                writer.write(args.spawner.read_bytes())
                writer.write_eof()
                await writer.drain()
                await log_task(reader, args.logger, args.silent)
            print('logger client finished')
        except OSError:
            return False

nirav-resideo avatar Oct 15 '23 04:10 nirav-resideo