(ctx, flow)
| 29 | |
| 30 | |
| 31 | def request(ctx, flow): |
| 32 | global step, ssl |
| 33 | print("==========") |
| 34 | print(f"GC: {gc.collect()}") |
| 35 | print(f"Threads: {threading.active_count()}") |
| 36 | |
| 37 | step += 1 |
| 38 | if step == 1: |
| 39 | all_objects = muppy.get_objects() |
| 40 | ssl = muppy.filter(all_objects, SSL.Connection)[0] |
| 41 | if step == 2: |
| 42 | ib = refbrowser.InteractiveBrowser(ssl, 2, str_fun, repeat=False) |
| 43 | del ssl # do this to unpollute view |
| 44 | ib.main(True) |
| 45 | # print("\r\n".join(str(x)[:100] for x in gc.get_referrers(ssl))) |