mirror of https://github.com/cowrie/cowrie.git
Treat python stdin as sourcefile (#1474)
Attacker used ```wget <file> | python -``` as a means to quickly execute code. This small fix treats the python stdin as a real file and does not output "Errno 2".
This commit is contained in:
parent
7fe5ee0ad2
commit
1f443b9844
|
@ -104,7 +104,7 @@ class command_python(HoneyPotCommand):
|
|||
for value in args:
|
||||
sourcefile = self.fs.resolve_path(value, self.protocol.cwd)
|
||||
|
||||
if self.fs.exists(sourcefile):
|
||||
if self.fs.exists(sourcefile) or value == '-':
|
||||
self.exit()
|
||||
else:
|
||||
|
||||
|
|
Loading…
Reference in New Issue