I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
pip install pyrasite
pip install uncompyle6
ps aux | grep python
pyrasite-shell <PID>
>>> from my_package import my_module
>>> dir(my_module)
['MyClass', 'my_function']
>>> import uncompyle6
>>> import sys
>>> uncompyle6.main.uncompyle(
2.7, my_module.my_function.func_code, sys.stdout
)
# uncompyle6 version 2.9.10
# Python bytecode 2.7
# Decompiled from: Python 2.7.12 (default, Nov 19 2016, 06:48:10)
# [GCC 5.4.0 20160609]
# Embedded file name: /srv/my_package/my_module.py
function_body = "appears here"
>>> uncompyle6.main.uncompyle(
2.7, my_module.MyClass.my_method.im_func.func_code, sys.stdout
)
# uncompyle6 version 2.9.10
# Python bytecode 2.7
# Decompiled from: Python 2.7.12 (default, Nov 19 2016, 06:48:10)
# [GCC 5.4.0 20160609]
# Embedded file name: /srv/my_package/my_module.py
class_method_body = "appears here"
Why been in a relationship without rest of mind. always feeling like your been cheated on. i have been married for 7 years now but for couple of months i notice some unusual change in my husband activities like late night calls, hiding messages, delete photos and many more but when i try to talk to him about it, he complains i nag a lot so i decided to hire a genuine hacker which i got introduced to Remote spy hacker . After couple of hours with this expert , i was able to gain access to my partner phone without any physical touch . i got to see his hidden messages, social media, gallery , call recordings and more. anyone in need of a genuine hacker can reach out to [ Remote spy hacker @ g(m)ail . c0m ]