Giter Site home page Giter Site logo

Comments (2)

micheloosterhof avatar micheloosterhof commented on May 29, 2024

You need to use a more modern Python. Please install Python 3.

from cowrie.

smilemonki avatar smilemonki commented on May 29, 2024

Hi @micheloosterhof

I have already upgrade my python3 version to python3.10.12, but not resolve problem.

Join the Cowrie community at: http://bit.ly/cowrieslack

Using activated Python virtual environment "/opt/cowrie/cowrie-env"
Starting cowrie: [twistd -n --umask=0022 --pidfile=var/run/cowrie.pid --logger cowrie.python.logfile.logger cowrie ]...
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/twisted/application/app.py", line 636, in parseOptions
usage.Options.parseOptions(self, options)
File "/usr/local/lib/python3.10/site-packages/twisted/python/usage.py", line 262, in parseOptions
for (cmd, short, parser, doc) in self.subCommands:
File "/usr/local/lib/python3.10/site-packages/twisted/application/app.py", line 653, in subCommands
for plug in sorted(plugins, key=attrgetter('tapname')):
File "/usr/local/lib/python3.10/site-packages/twisted/plugin.py", line 213, in getPlugins
allDropins = getCache(package)
--- ---
File "/usr/local/lib/python3.10/site-packages/twisted/plugin.py", line 171, in getCache
provider = pluginModule.load()
File "/usr/local/lib/python3.10/site-packages/twisted/python/modules.py", line 392, in load
return self.pathEntry.pythonPath.moduleLoader(self.name)
File "/usr/local/lib/python3.10/site-packages/twisted/python/reflect.py", line 308, in namedAny
topLevelPackage = _importAndCheckStack(trialname)
File "/usr/local/lib/python3.10/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
reraise(excValue, excTraceback)
File "/usr/local/lib/python3.10/site-packages/twisted/python/compat.py", line 463, in reraise
raise exception.with_traceback(traceback)
File "/opt/cowrie/src/twisted/plugins/cowrie_plugin.py", line 45, in
import cowrie.core.checkers
File "/opt/cowrie/src/cowrie/core/checkers.py", line 13, in
from twisted.conch.ssh import keys
File "/usr/local/lib/python3.10/site-packages/twisted/conch/ssh/keys.py", line 40, in
from twisted.conch.ssh import common, sexpy
File "/usr/local/lib/python3.10/site-packages/twisted/conch/ssh/common.py", line 15, in
from cryptography.utils import int_from_bytes, int_to_bytes
builtins.ImportError: cannot import name 'int_from_bytes' from 'cryptography.utils' (/usr/local/lib/python3.10/site-packages/cryptography/utils.py)

Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/twisted/python/usage.py", line 447, in str
return self.getSynopsis() + '\n' + self.getUsage(width=None)
File "/usr/local/lib/python3.10/site-packages/twisted/python/usage.py", line 484, in getUsage
for (cmd, short, parser, desc) in self.subCommands:
File "/usr/local/lib/python3.10/site-packages/twisted/application/app.py", line 653, in subCommands
for plug in sorted(plugins, key=attrgetter('tapname')):
File "/usr/local/lib/python3.10/site-packages/twisted/plugin.py", line 213, in getPlugins
allDropins = getCache(package)
--- ---
File "/usr/local/lib/python3.10/site-packages/twisted/plugin.py", line 171, in getCache
provider = pluginModule.load()
File "/usr/local/lib/python3.10/site-packages/twisted/python/modules.py", line 392, in load
return self.pathEntry.pythonPath.moduleLoader(self.name)
File "/usr/local/lib/python3.10/site-packages/twisted/python/reflect.py", line 308, in namedAny
topLevelPackage = _importAndCheckStack(trialname)
File "/usr/local/lib/python3.10/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
reraise(excValue, excTraceback)
File "/usr/local/lib/python3.10/site-packages/twisted/python/compat.py", line 463, in reraise
raise exception.with_traceback(traceback)
File "/opt/cowrie/src/twisted/plugins/cowrie_plugin.py", line 45, in
import cowrie.core.checkers
File "/opt/cowrie/src/cowrie/core/checkers.py", line 13, in
from twisted.conch.ssh import keys
File "/usr/local/lib/python3.10/site-packages/twisted/conch/ssh/keys.py", line 40, in
from twisted.conch.ssh import common, sexpy
File "/usr/local/lib/python3.10/site-packages/twisted/conch/ssh/common.py", line 15, in
from cryptography.utils import int_from_bytes, int_to_bytes
builtins.ImportError: cannot import name 'int_from_bytes' from 'cryptography.utils' (/usr/local/lib/python3.10/site-packages/cryptography/utils.py)

Usage: twistd [options]
Options:
-b, --debug Run the application in the Python Debugger (implies
nodaemon), sending SIGUSR2 will drop into
debugger
--chroot= Chroot to a supplied directory before running
-d, --rundir= Change to a supplied directory before running [default:
.]
-e, --encrypted The specified tap/aos file is encrypted.
--euid Set only effective user-id rather than real user-id.
(This option has no effect unless the server is running
as root, in which case it means not to shed all
privileges after binding ports, retaining the option to
regain privileges in cases such as spawning processes.
Use with caution.)
-f, --file= read the given .tap file [default: twistd.tap]
-g, --gid= The gid to run as. If not specified, the default gid
associated with the specified --uid is used.
--help Display this help and exit.
--help-reactors Display a list of possibly available reactor names.
-l, --logfile= log to a specified file, - for stdout
--logger= A fully-qualified name to a log observer factory to use
for the initial log observer. Takes precedence over
--logfile and --syslog (when available).
-n, --nodaemon don't daemonize, don't use default umask of 0077
-o, --no_save do not save state on shutdown
--originalname Don't try to change the process name
-p, --profile= Run in profile mode, dumping results to specified file.
--pidfile= Name of the pidfile [default: twistd.pid]
--prefix= use the given prefix when syslogging [default: twisted]
--profiler= Name of the profiler to use (profile, cprofile).
[default: cprofile]
-r, --reactor= Which reactor to use (see --help-reactors for a list of
possibilities)
-s, --source= Read an application from a .tas file (AOT format).
--savestats save the Stats object rather than the text output of the
profiler.
--spew Print an insanely verbose log of everything that happens.
Useful when debugging freezes or locks in complex code.
--syslog Log to syslog, not to file
-u, --uid= The uid to run as.
--umask= The (octal) file creation mask to apply.
--version Print version information and exit.
-y, --python= read an application from within a Python file (implies
-o)

twistd reads a twisted.application.service.Application out of a file and runs
it.
Commands:
conch A Conch SSH service.
dns A domain name server.
ftp An FTP server.
inetd An inetd(8) replacement.
manhole An interactive remote debugger service accessible via
telnet and ssh and providing syntax coloring and basic line
editing functionality.
portforward A simple port-forwarder.
procmon A process watchdog / supervisor
socks A SOCKSv4 proxy service.
web A general-purpose web server which can serve from a
filesystem or application resource.
words A modern words server
xmpp-router An XMPP Router server

/usr/local/bin/twistd: Unknown command: cowrie

from cowrie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.