Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowrie/cowrie
/ functions
Functions
2,302 in github.com/cowrie/cowrie
⨍
Functions
2,302
◇
Types & classes
393
↳
Endpoints
20
↓ 7 callers
Method
get_channel
(self, channel_num: int, parent: str)
src/cowrie/ssh_proxy/protocols/ssh.py:406
↓ 7 callers
Method
handle_CTRL_D
(self)
src/cowrie/llm/protocol.py:414
↓ 7 callers
Function
read_data_bytes
Read bundled cowrie.data/<parts> as bytes. Raises FileNotFoundError if the resource does not exist.
src/cowrie/core/resources.py:34
↓ 7 callers
Function
run_exec
Run `cmd` over an exec channel and return the exit status the session would report to the SSH client via processEnded.
src/cowrie/test/test_exit_status.py:156
↓ 6 callers
Method
_extract_cve_2026_24061_user
Extract username from CVE-2026-24061 exploit payload. The exploit uses USER=-f<user> or USER=-f <user> to bypass authentication.
src/cowrie/telnet/userauth.py:237
↓ 6 callers
Method
_word_literal
Return the text of a word that is a single unquoted literal atom, else None. Keywords are recognised only through this, so a quoted or expande
src/cowrie/shell/bashparse.py:407
↓ 6 callers
Method
_write
(self, relpath: str, data: bytes)
src/cowrie/test/test_createfs.py:34
↓ 6 callers
Method
chmod
(self, path: str, perm: int)
src/cowrie/shell/fs.py:550
↓ 6 callers
Function
create_endpoint_services
(reactor, parent, listen_endpoints, factory)
src/cowrie/core/utils.py:158
↓ 6 callers
Function
logit
(ftxt)
src/cowrie/scripts/createfs.py:83
↓ 6 callers
Function
process_status
A process-end reason carrying an exit status. ``ProcessDone`` for 0 (a clean exit) and ``ProcessTerminated`` otherwise, so the SSH session re
src/cowrie/shell/command.py:22
↓ 6 callers
Function
remove_stale_pidfile
Remove the PID file if it exists.
src/cowrie/scripts/cowrie.py:78
↓ 6 callers
Function
run_exec_scp_push
Drive a full exec-channel `scp -t` push. The SCP-framed bytes are delivered after the command has started, exactly as the SSH channel deliver
src/cowrie/test/test_scp_exec.py:52
↓ 6 callers
Method
showPrompt
(self)
src/cowrie/shell/honeypot.py:721
↓ 6 callers
Method
sleep
(self, time: float, time2: float | None = None)
src/cowrie/commands/apt.py:57
↓ 6 callers
Method
stat
(self, path: str, follow_symlinks: bool = True)
src/cowrie/shell/fs.py:601
↓ 6 callers
Method
write
(self, event: dict[str, Any])
src/cowrie/output/s3.py:57
↓ 6 callers
Method
write
Because of the presence of two ProtocolTransportMixin in the protocol stack once authenticated, I need to override write() and remove
src/cowrie/telnet/transport.py:78
↓ 5 callers
Method
_add_to_collection
Add a file or URL to the configured collection Args: resource_type: 'files' or 'urls' resource_id: The file
src/cowrie/output/virustotal.py:652
↓ 5 callers
Function
_file_entry
Build a T_FILE pickle entry with empty A_CONTENTS.
src/cowrie/test/test_fsctl.py:18
↓ 5 callers
Function
_link_entry
Build a T_LINK entry pointing at an absolute path inside the tree.
src/cowrie/test/test_honeyfs.py:33
↓ 5 callers
Method
_patch_tree
(self, root: list)
src/cowrie/test/test_honeyfs.py:206
↓ 5 callers
Function
_root
(children: list)
src/cowrie/test/test_fsctl.py:28
↓ 5 callers
Method
_set_contents_path
(self, path: str)
src/cowrie/test/test_honeyfs.py:203
↓ 5 callers
Method
_write
(self, relpath: str, data: bytes)
src/cowrie/test/test_fsctl.py:44
↓ 5 callers
Method
checkUserPass
(self, theusername: bytes, thepassword: bytes, ip: str)
src/cowrie/core/checkers.py:119
↓ 5 callers
Method
chown
(self, path: str, uid: int, gid: int)
src/cowrie/shell/fs.py:556
↓ 5 callers
Method
epoch_to_string_utc
(t)
src/cowrie/output/abuseipdb.py:367
↓ 5 callers
Method
extract_bool
(self)
src/cowrie/ssh_proxy/protocols/base_protocol.py:54
↓ 5 callers
Function
is_process_running
Check if a process with the given PID is running.
src/cowrie/scripts/cowrie.py:69
↓ 5 callers
Function
make_protocol
(channel_type: str)
src/cowrie/test/test_insults.py:30
↓ 5 callers
Method
open
#log.msg("fs.open %s" % filename) #if (openFlags & os.O_APPEND == os.O_APPEND): # log.msg("fs.open append") #if
src/cowrie/shell/fs.py:440
↓ 5 callers
Method
parse_args
(self)
src/cowrie/commands/chmod.py:106
↓ 5 callers
Function
string_to_hex
(message: str)
src/cowrie/ssh_proxy/util.py:11
↓ 4 callers
Method
__init__
(self, avatar)
src/cowrie/shell/protocol.py:50
↓ 4 callers
Method
__init__
(self, avatar)
src/cowrie/llm/protocol.py:38
↓ 4 callers
Method
_assert_fs
(self, out: dict)
src/cowrie/test/test_ocsf.py:369
↓ 4 callers
Method
_assert_ssh
(self, out: dict)
src/cowrie/test/test_ocsf.py:220
↓ 4 callers
Method
_build_tree
(self)
src/cowrie/test/test_createfs.py:39
↓ 4 callers
Method
_chainNegotiation
(self, res, func, option)
src/cowrie/telnet/transport.py:181
↓ 4 callers
Method
_clip
(self, s: str, max_len: int)
src/cowrie/output/discord.py:196
↓ 4 callers
Method
_emit_redirection_error
Send a redirection-related error to the terminal and flag failure.
src/cowrie/shell/pipe.py:268
↓ 4 callers
Method
_end_loop
(self)
src/cowrie/shell/honeypot.py:300
↓ 4 callers
Method
_eval
(self, command: object)
src/cowrie/test/test_bashparse.py:319
↓ 4 callers
Method
_finish
(self, success: bool = True)
src/cowrie/commands/dd.py:89
↓ 4 callers
Method
_getAttrs
(self, s)
src/cowrie/shell/filetransfer.py:200
↓ 4 callers
Method
_get_option_name
Get human-readable name for a telnet option byte.
src/cowrie/telnet/transport.py:187
↓ 4 callers
Method
_has_mode
(self, path: str, mask: int)
src/cowrie/commands/base.py:1381
↓ 4 callers
Method
_is_separator
(self, node: Tree | Token | None)
src/cowrie/shell/bashparse.py:396
↓ 4 callers
Method
_leaf_value
Return the string value of a node's single leaf token.
src/cowrie/shell/bashparse.py:905
↓ 4 callers
Method
_log_negotiation
Log a telnet option negotiation once per (command, option) per connection. Logged for security monitoring and CVE detection. A scanne
src/cowrie/telnet/transport.py:194
↓ 4 callers
Method
_post_comment
Send a comment to VirusTotal for a file or URL Args: resource_type: 'files' or 'urls' resource_id: The file
src/cowrie/output/virustotal.py:514
↓ 4 callers
Method
_skip_separators
(self, cursor: _Cursor)
src/cowrie/shell/bashparse.py:731
↓ 4 callers
Function
_ssh_activity
Fill in the shared OCSF 'SSH Activity' (class_uid 4007) scaffolding. Endpoints are built from whatever address keys are present in the event
src/cowrie/core/ocsf.py:62
↓ 4 callers
Method
check_arguments
(self, application, args)
src/cowrie/shell/command.py:101
↓ 4 callers
Function
check_initialized
Refuse to start unless cwd looks like a cowrie state directory or a cowrie source checkout. Marker files (any one of): - ./etc/cowrie.cfg
src/cowrie/scripts/cowrie.py:33
↓ 4 callers
Method
close
(self)
src/cowrie/telnet_proxy/handler.py:111
↓ 4 callers
Method
command_substitution
Execute ``source`` and return its captured stdout (newlines stripped).
src/cowrie/shell/bashparse.py:188
↓ 4 callers
Method
do_free
print free statistics
src/cowrie/commands/free.py:47
↓ 4 callers
Method
getProtoTransport
Due to protocol nesting differences, we need provide how we grab the proper transport to access underlying SSH information. Meant to
src/cowrie/llm/protocol.py:55
↓ 4 callers
Function
get_config_path
Locate operator config files. Search order, cwd-relative except the system-wide path: 1. /etc/cowrie/cowrie.cfg (system-wide install)
src/cowrie/core/config.py:67
↓ 4 callers
Method
getgrgid
Get group entry for gid
src/cowrie/shell/pwd.py:187
↓ 4 callers
Method
getpwuid
Get passwd entry for uid
src/cowrie/shell/pwd.py:99
↓ 4 callers
Function
int_to_hex
(value: int)
src/cowrie/ssh_proxy/util.py:22
↓ 4 callers
Function
is_directory
Returns whether or not the file at 'path' is a directory :param fs: :param path: :return:
src/cowrie/scripts/fsctl.py:86
↓ 4 callers
Function
kernel_name
()
src/cowrie/commands/uname.py:22
↓ 4 callers
Method
no_permission
(self)
src/cowrie/commands/iptables.py:443
↓ 4 callers
Method
output
This is the cat output, with optional line numbering
src/cowrie/commands/cat.py:73
↓ 4 callers
Method
output
This is the awk output.
src/cowrie/commands/awk.py:107
↓ 4 callers
Method
parse_num_packet
(self, parent: str, message_num: int, payload: bytes)
src/cowrie/ssh_proxy/protocols/ssh.py:91
↓ 4 callers
Method
print_usage_error
Print usage error message
src/cowrie/commands/nc.py:72
↓ 4 callers
Method
processEnded
(self, reason=None)
src/cowrie/llm/telnet.py:114
↓ 4 callers
Function
read_honeyfs_bytes
Read a honeyfs file with operator-override cascade. Resolution: 1. If [honeypot] contents_path is set and <contents_path>/<relpath>
src/cowrie/shell/honeyfs.py:123
↓ 4 callers
Function
read_pid
Read the PID from the PID file, return None if not found or invalid.
src/cowrie/scripts/cowrie.py:59
↓ 4 callers
Function
run
()
src/cowrie/scripts/fsctl.py:874
↓ 4 callers
Method
savevars
Save the user vars to json file
src/cowrie/core/auth.py:180
↓ 4 callers
Method
scanfile
Check file scan report for a hash Argument is full event so we can access full file later on
src/cowrie/output/virustotal.py:221
↓ 4 callers
Method
update_size
(self, filename: str, size: int)
src/cowrie/shell/fs.py:627
↓ 4 callers
Method
uptime
Uptime
src/cowrie/llm/protocol.py:247
↓ 4 callers
Method
user_is_root
(self)
src/cowrie/commands/iptables.py:56
↓ 4 callers
Method
write
(self, data)
src/cowrie/telnet_proxy/client_transport.py:60
↓ 3 callers
Function
_find_in
Walk to entry at path. Test helper, asserts found.
src/cowrie/test/test_fsctl.py:32
↓ 3 callers
Method
_handleNegotiationError
(self, f, func, option)
src/cowrie/telnet/transport.py:151
↓ 3 callers
Method
_init_collection
Resolve the collection id: look up an existing collection with this name and reuse it, otherwise create one. Called during start() if
src/cowrie/output/virustotal.py:562
↓ 3 callers
Method
_process
(self, data: bytes)
src/cowrie/commands/cut.py:113
↓ 3 callers
Method
_report_syntax_error
Write the message bash prints for a syntax error and set $? to 2.
src/cowrie/shell/honeypot.py:210
↓ 3 callers
Method
_send
(self, message: str)
src/cowrie/output/signal.py:50
↓ 3 callers
Method
_show_prompt
Display the appropriate command prompt to the user.
src/cowrie/llm/protocol.py:235
↓ 3 callers
Method
_tokens
(self, line: str)
src/cowrie/test/test_bashparse.py:289
↓ 3 callers
Method
_var_name
Return (name, special) for a dollar_var/dollar_brace node.
src/cowrie/shell/bashparse.py:911
↓ 3 callers
Function
bin_string_to_hex
(message: bytes)
src/cowrie/ssh_proxy/util.py:17
↓ 3 callers
Method
calculate_packets
(byte_count: int)
src/cowrie/commands/ifconfig.py:32
↓ 3 callers
Method
call_command
(self, pp, cmd, *args)
src/cowrie/shell/protocol.py:249
↓ 3 callers
Method
can_rereport
(self, ip_key, current_time)
src/cowrie/output/abuseipdb.py:237
↓ 3 callers
Method
cleanup_and_dump_state
(self, mode=0)
src/cowrie/output/abuseipdb.py:258
↓ 3 callers
Method
connectionLost
Called when the connection is shut down. Clear any circular references here, and any external references to this Protocol. Th
src/cowrie/shell/protocol.py:140
↓ 3 callers
Method
connectionMade
(self)
src/cowrie/shell/protocol.py:88
↓ 3 callers
Method
connectionMade
(self)
src/cowrie/llm/protocol.py:70
↓ 3 callers
Method
connectionMade
(self)
src/cowrie/test/test_telnet_transport.py:131
↓ 3 callers
Method
convert_bytes_to_mx
(bytes_eth0: int)
src/cowrie/commands/ifconfig.py:36
← previous
next →
101–200 of 2,302, ranked by callers