You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I try to save a session (either via exiting from scapy started with -s flag, or by using save_session function), I receive error: PicklingError: Can't pickle <function open at 0x7212fd7be680>: it's not the same object as io.open.
Scapy version
2.5.0 (both with pip version and with 277f3 commit)
Python version
3.10
Operating system
Arch Linux
Additional environment information
No response
How to reproduce
Either:
Start a shell without -s flag.
Type: save_session("01")
Or:
Start a shell with -s 01 flag.
Type exit()
Actual result
In first case, the log is:
sudo -E scapy -H
Welcome to Scapy (2.5.0.dev230) using IPython 8.21.0
>>> save_session("01")
INFO: Saving session into [01]
---------------------------------------------------------------------------
PicklingError Traceback (most recent call last)
Cell In[1], line 1
----> 1 save_session("01")
File ~/.asdf/installs/python/3.10.13/lib/python3.10/site-packages/scapy/main.py:425, in save_session(fname, session, pickleProto)
422 pass
424 f = gzip.open(fname, "wb")
--> 425 pickle.dump(to_be_saved, f, pickleProto)
426 f.close()
PicklingError: Can't pickle <function open at 0x7ea2845b6680>: it's not the same object as io.open
>>>
In second case, the log is:
sudo -E scapy -H -s 01
Welcome to Scapy (2.5.0.dev230) using IPython 8.21.0
>>> %config Application.verbose_crash=True
>>> exit
INFO: Saving session into [01]
Error in sys.excepthook:
Traceback (most recent call last):
File "/home/ought/.asdf/installs/python/3.10.13/lib/python3.10/pathlib.py", line 1305, in is_dir
return S_ISDIR(self.stat().st_mode)
AttributeError: 'str' object has no attribute 'stat'
Original exception was:
Traceback (most recent call last):
File "/home/ought/.asdf/installs/python/3.10.13/bin/scapy", line 8, in <module>
sys.exit(interact())
File "/home/ought/.asdf/installs/python/3.10.13/lib/python3.10/site-packages/scapy/main.py", line 933, in interact
save_session(conf.session, SESSION)
File "/home/ought/.asdf/installs/python/3.10.13/lib/python3.10/site-packages/scapy/main.py", line 425, in save_session
pickle.dump(to_be_saved, f, pickleProto)
_pickle.PicklingError: Can't pickle <function open at 0x79c2b3f42680>: it's not the same object as io.open
Expected result
No response
Related resources
No response
The text was updated successfully, but these errors were encountered:
Brief description
Whenever I try to save a session (either via exiting from scapy started with
-s
flag, or by usingsave_session
function), I receive error:PicklingError: Can't pickle <function open at 0x7212fd7be680>: it's not the same object as io.open
.Scapy version
2.5.0 (both with pip version and with 277f3 commit)
Python version
3.10
Operating system
Arch Linux
Additional environment information
No response
How to reproduce
Either:
-s
flag.save_session("01")
Or:
-s 01
flag.exit()
Actual result
In first case, the log is:
In second case, the log is:
Expected result
No response
Related resources
No response
The text was updated successfully, but these errors were encountered: