pyrasite icon indicating copy to clipboard operation
pyrasite copied to clipboard

b'...' output from --verbose in Python 3

Open ivan opened this issue 9 years ago • 1 comments

e.g.

~/.local/bin/pyrasite --verbose 4093 reverse_python_shell.py         
b'[New LWP 4097]\n[New LWP 4096]\n[New LWP 4095]\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".\n0x00007f9df52689a3 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81\n$1 = 1\n[New Thread 0x7f9ddffff700 (LWP 4122)]\n$2 = 0\n$3 = 15550096\n'
b'81\t../sysdeps/unix/syscall-template.S: No such file or directory.\n'

ivan avatar Jul 22 '14 07:07 ivan

I get something similar:

pyrasite --verbose 3298 reverse_python_shell.py
b'[New LWP 3309]\n[New LWP 3310]\n[New LWP 3311]\n[New LWP 3312]\n[New LWP 3313]\n[New LWP 3314]\n[New LWP 3315]\n[New LWP 3316]\n[New LWP 3317]\n[New LWP 3322]\n[New LWP 3323]\n[New LWP 3324]\n[New LWP 3325]\n[New LWP 3326]\n[New LWP 3327]\n[New LWP 3328]\n[New LWP 3329]\n[New LWP 3330]\n[New LWP 3331]\n[New LWP 3332]\n[New LWP 3333]\n[New LWP 3334]\n[New LWP 3335]\n[New LWP 3337]\n[New LWP 3338]\n[New LWP 3339]\n[New LWP 3340]\n[New LWP 3341]\n[New LWP 3342]\n[New LWP 3343]\n[New LWP 3593]\n[New LWP 3594]\n[New LWP 3595]\n[New LWP 3596]\n[New LWP 3597]\n[New LWP 3598]\n[New LWP 3599]\n[New LWP 3600]\n[New LWP 3601]\n[New LWP 3602]\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".\nsyscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38\n$1 = 0x1 <error: Cannot access memory at address 0x1>\n[New Thread 0x7f65e3fff700 (LWP 16942)]\n'
b'38\t../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.\n'

Those appear to be coming from glibc's assembly wrappers.

In the aftermath I also get this message on the terminal of the target process:

Traceback (most recent call last):
  File ".../env3/lib/python3.6/site-packages/pyrasite/reverse.py", line 79, in run
    'connection to %s:%d' % (self.host, self.port))
Exception: pyrasite cannot establish reverse connection to localhost:9001

Does that mean injection did work, but pyrasite was gone already?

bertsky avatar Feb 14 '19 13:02 bertsky