#40396·cowrie

`curl` progress bar shows hardcoded, constant transfer speed values instead of the actual measured speed

Author: vbontchevCreated Jul 28, 2026Updated Sep 15, 2026

Describe the bug Command_curl.collect() in src/cowrie/commands/curl.py prints a curl-style progress line on every chunk of data received:

self.write(
    f"\r100  {self.currentlength}  100  {self.currentlength}    0     0  {63673}      0 --:--:-- --:--:-- --:--:-- {65181}"
)

The two speed fields are hardcoded literals (63673 and 65181) rather than being calculated from the actual bytes transferred and elapsed time. Every curl download through the honeypot therefore reports the exact same transfer speed regardless of file size, network conditions, or how long the transfer actually took. wget.py's equivalent progress output already computes a real speed from currentlength and elapsed time; this is purely a cosmetic/fidelity gap in curl.py, not a functional defect, but it is a static, checkable difference from real curl output that could aid an attacker in fingerprinting the emulation.

To Reproduce Steps to reproduce the behavior:

  1. From the honeypot, run curl -O <url> against files of very different sizes, or over connections of very different speeds
  2. Observe the reported transfer speed (the two numeric fields before and after the --:--:-- columns) is always exactly 63673 and 65181, never varying with the actual transfer

Expected behavior The reported speed should reflect the actual bytes transferred over the actual elapsed time, as real curl does and as wget.py's progress output in this same codebase already does.

Server (please complete the following information):

  • OS: Windows 10 Pro (not OS-specific; reproducible on any platform)
  • Python: 3.14.2
  • Twisted: 26.4.0

Additional context

  • Cowrie Mode: Shell (default)
  • I was of two minds whether to report this. Clearly, this is just a cosmetic, low-priority bug. But since wget has a proper speed indicator, I decided to report this for consistency. Make of it what you will.
  • Attached file with the fix applied: src/cowrie/commands/curl.py (computes speed from currentlength and elapsed time since the response started, mirroring wget.py's existing calculation).

curl.py