MCPcopy Create free account

hub / github.com/cowrie/cowrie / functions

Functions2,302 in github.com/cowrie/cowrie

↓ 2 callersMethodupload
(self, shasum, filename)
src/cowrie/output/s3.py:80
↓ 2 callersMethodversion
(self)
src/cowrie/commands/wc.py:29
↓ 2 callersMethodversion
Print long or short version
src/cowrie/commands/gcc.py:164
↓ 2 callersMethodversion
(self)
src/cowrie/commands/python.py:22
↓ 2 callersMethodwc_application
(self, contents: bytes, optlist: list[tuple[str, str]])
src/cowrie/commands/wc.py:74
↓ 2 callersMethodwrite
Write a string to the user on stdout
src/cowrie/shell/command.py:83
↓ 2 callersMethodwrite
(self, data: bytes)
src/cowrie/shell/session.py:33
↓ 2 callersMethodwrite
(self, data)
src/cowrie/telnet/session.py:161
↓ 1 callersMethod__consumers_get_any_guest
try to get a VM with few clients
src/backend_pool/pool_service.py:423
↓ 1 callersMethod__consumers_get_available_guest
(self)
src/backend_pool/pool_service.py:416
↓ 1 callersMethod__consumers_get_guest_ip
(self, src_ip: str)
src/backend_pool/pool_service.py:407
↓ 1 callersMethod__destroy_all_guests
(self)
src/backend_pool/libvirt/backend_service.py:174
↓ 1 callersMethod__destroy_all_network_filters
(self)
src/backend_pool/libvirt/backend_service.py:203
↓ 1 callersMethod__destroy_all_networks
(self)
src/backend_pool/libvirt/backend_service.py:190
↓ 1 callersMethod__producer_check_health
Checks all usable guests, and whether they should have connectivity. If they don't, then mark them for deletion.
src/backend_pool/pool_service.py:279
↓ 1 callersMethod__producer_create_guests
Creates guests until the pool has the allotted amount
src/backend_pool/pool_service.py:344
↓ 1 callersMethod__producer_destroy_timed_out
Loops over 'unavailable' guests, and invokes qemu to destroy the corresponding domain
src/backend_pool/pool_service.py:298
↓ 1 callersMethod__producer_mark_available
Checks recently-booted guests ('created' state), and whether they are accepting SSH or Telnet connections, which indicates they are r
src/backend_pool/pool_service.py:323
↓ 1 callersMethod__producer_mark_timed_out
Checks timed-out VMs and acquires lock to safely mark for deletion
src/backend_pool/pool_service.py:255
↓ 1 callersMethod__producer_remove_destroyed
Removes guests marked as destroyed (so no qemu domain existing) and simply removes their object from the list
src/backend_pool/pool_service.py:314
↓ 1 callersMethod_amp_redirect
Parse a ``&>`` / ``&>>`` token into (append, inline target). Returns None if the token is not an ``&>`` redirection. ``&>`` truncates
src/cowrie/shell/parser.py:69
↓ 1 callersMethod_apply_amp_redirection
Redirect both stdout and stderr (``&>file`` == ``>file 2>&1``).
src/cowrie/shell/parser.py:81
↓ 1 callersMethod_apply_redirection
Handle one redirection token and append it to the ops list.
src/cowrie/shell/parser.py:108
↓ 1 callersMethod_binary
(self, left: str, op: str, right: str)
src/cowrie/commands/base.py:1319
↓ 1 callersMethod_build_embed
Return payload dict with one embed representing the event.
src/cowrie/output/discord.py:162
↓ 1 callersMethod_build_headers
Build HTTP headers with authentication.
src/cowrie/llm/llm.py:125
↓ 1 callersMethod_call_function
Run a function body with $1.. , $#, $@ and $* bound to ``args``. Only the positional parameters for this call ($1..$len(args)) are saved
src/cowrie/shell/honeypot.py:431
↓ 1 callersMethod_capture_command
Run one command in this capture shell and return its captured stdout. The command's words are expanded against the capture shell's live
src/cowrie/shell/honeypot.py:222
↓ 1 callersMethod_capture_login
(self, run: Callable[[], object])
src/cowrie/test/test_checkers.py:48
↓ 1 callersMethod_capture_statements
Run statements in this capture shell, concatenating their stdout and honoring &&/|| short-circuit between them (a subshell's gate covers the
src/cowrie/shell/honeypot.py:151
↓ 1 callersMethod_cleanup_all
Remove expired entries from all keys.
src/cowrie/core/rate_limiter.py:82
↓ 1 callersMethod_color_from_eventid
(self, eventid: str)
src/cowrie/output/discord.py:219
↓ 1 callersMethod_create_redirect_target
Create a new backing file for a redirected output target.
src/cowrie/shell/pipe.py:217
↓ 1 callersMethod_currentFormattingState
(self)
src/cowrie/test/fake_transport.py:176
↓ 1 callersMethod_do_netstat_route4
(self)
src/cowrie/commands/netstat.py:78
↓ 1 callersMethod_do_netstat_route6
(self)
src/cowrie/commands/netstat.py:102
↓ 1 callersMethod_drive_pending_negotiation
Reproduce the production flow against a non-answering client. telnet_User -> willChain(ECHO); the client never answers, so the negoti
src/cowrie/test/test_telnet_transport.py:180
↓ 1 callersMethod_emptyLine
(self, width)
src/cowrie/test/fake_transport.py:182
↓ 1 callersMethod_ensure_artifact_closed
Hash and store the artifact on every exit path - called via addBoth. Artifact.close() computes the sha256 and renames the temp file to its
src/cowrie/commands/tftp.py:314
↓ 1 callersFunction_epoch_ms
Convert a Cowrie ISO-8601 UTC timestamp (e.g. '2026-06-23T14:15:26.253618Z') to epoch milliseconds, the integer form OCSF uses for time field
src/cowrie/core/ocsf.py:53
↓ 1 callersMethod_error_token
Reconstruct bash's reported token for a misplaced ``(``. bash points at the ``(`` together with the run of non-space characters that
src/cowrie/shell/bashparse.py:946
↓ 1 callersMethod_error_token_at
(self, line: str, token: Token)
src/cowrie/shell/bashparse.py:766
↓ 1 callersMethod_eval
(self, args: list[str])
src/cowrie/commands/base.py:1278
↓ 1 callersMethod_eval_atom
(self, line: str, atom: Tree | Token)
src/cowrie/shell/bashparse.py:822
↓ 1 callersMethod_eval_dquoted
(self, line: str, dq: Tree)
src/cowrie/shell/bashparse.py:841
↓ 1 callersMethod_eval_word
Evaluate a word to its final string, or None if it should be dropped. A word is dropped when it is exactly an unquoted reference to an unset
src/cowrie/shell/bashparse.py:794
↓ 1 callersMethod_extract_redir_op
Parse a combined redirection token into (op, fd, inline target).
src/cowrie/shell/parser.py:99
↓ 1 callersMethod_file_test
(self, op: str, operand: str)
src/cowrie/commands/base.py:1343
↓ 1 callersFunction_find
Walk the cached tree to find the entry at virtual_path. Follows T_LINK entries (both intermediate and terminal) up to a fixed depth, treating
src/cowrie/shell/honeyfs.py:35
↓ 1 callersMethod_format_request_body
Structure the request body for the LLM API. Anthropic Messages API requires the system prompt as a top-level parameter; OpenAI uses a
src/cowrie/llm/llm.py:142
↓ 1 callersMethod_format_simplified_message
Format event into a simplified, readable message with Slack formatting
src/cowrie/output/slack.py:43
↓ 1 callersMethod_ftp_start_retrieve
Start retrieving file over FTP
src/cowrie/commands/wget.py:347
↓ 1 callersMethod_get_random_ip
()
src/cowrie/commands/dig.py:23
↓ 1 callersMethod_is_valid_domain
Returns True if the domain looks like a real DNS name.
src/cowrie/commands/dig.py:32
↓ 1 callersMethod_looks_like_funcdef
Detect ``name ()`` at command position (the "()" lexes as LPAR RPAR, or as an empty subshell when separated by a space).
src/cowrie/shell/bashparse.py:677
↓ 1 callersMethod_make_command
( self, line: str, units: list[Tree | Token], op: str | None )
src/cowrie/shell/bashparse.py:513
↓ 1 callersFunction_make_exec_transport
Build the transport.session.conn.transport chain insults expects.
src/cowrie/test/test_scp_exec.py:35
↓ 1 callersMethod_match
(self, path: str)
src/cowrie/commands/find.py:102
↓ 1 callersMethod_needs_new_backing
Decide whether to create a fresh real file for redirection target.
src/cowrie/shell/pipe.py:207
↓ 1 callersMethod_object_exists_remote
(self, shasum)
src/cowrie/output/s3.py:65
↓ 1 callersMethod_on_command
(self, ev: dict)
src/cowrie/output/prometheus.py:177
↓ 1 callersMethod_on_download
(self, ev: dict)
src/cowrie/output/prometheus.py:181
↓ 1 callersMethod_on_login
(self, ev: dict, *, success: bool)
src/cowrie/output/prometheus.py:169
↓ 1 callersMethod_on_outbound
(self, ev: dict)
src/cowrie/output/prometheus.py:188
↓ 1 callersMethod_on_session_closed
(self, ev: dict)
src/cowrie/output/prometheus.py:158
↓ 1 callersMethod_on_session_connect
(self, ev: dict)
src/cowrie/output/prometheus.py:146
↓ 1 callersMethod_out_of_range_fd
Return the first file descriptor in ``op`` that exceeds the open-file limit, which bash rejects with "Bad file descriptor", or None.
src/cowrie/shell/pipe.py:77
↓ 1 callersMethod_parse_case
(self, line: str, cursor: _Cursor, op: str | None)
src/cowrie/shell/bashparse.py:610
↓ 1 callersMethod_parse_case_patterns
Read ``pat[|pat]*)`` and return the raw pattern strings.
src/cowrie/shell/bashparse.py:646
↓ 1 callersMethod_parse_field_spec
Parse a field specification like '1,3' or '2-4' or '1,3-' into ranges. Returns a list of (start, end) tuples where indices are 0-based.
src/cowrie/commands/cut.py:85
↓ 1 callersMethod_parse_for
(self, line: str, cursor: _Cursor, op: str | None)
src/cowrie/shell/bashparse.py:536
↓ 1 callersMethod_parse_function
(self, line: str, cursor: _Cursor, op: str | None)
src/cowrie/shell/bashparse.py:691
↓ 1 callersMethod_parse_function_keyword
( self, line: str, cursor: _Cursor, op: str | None )
src/cowrie/shell/bashparse.py:697
↓ 1 callersMethod_parse_if
(self, line: str, cursor: _Cursor, op: str | None)
src/cowrie/shell/bashparse.py:569
↓ 1 callersMethod_parse_simple
Gather one simple command / pipeline up to the next statement end.
src/cowrie/shell/bashparse.py:497
↓ 1 callersMethod_parse_statement
( self, line: str, cursor: _Cursor, op: str | None )
src/cowrie/shell/bashparse.py:467
↓ 1 callersMethod_parse_while
( self, line: str, cursor: _Cursor, op: str | None, until: bool )
src/cowrie/shell/bashparse.py:596
↓ 1 callersMethod_pipe_to_next
Pass data to the next command in the pipeline if present.
src/cowrie/shell/pipe.py:321
↓ 1 callersMethod_prepare_output_file
Resolve and ready an output file, returning metadata for writing.
src/cowrie/shell/pipe.py:175
↓ 1 callersMethod_prepare_stdin
Load stdin from a redirected file path into input_data.
src/cowrie/shell/pipe.py:159
↓ 1 callersMethod_process_command_with_llm
Process a command by sending it to the LLM and writing the response to the terminal.
src/cowrie/llm/protocol.py:187
↓ 1 callersMethod_process_exec_with_llm
Process an exec command with the LLM and return the result. Used when commands are passed directly to SSH (e.g., ssh user@host 'comma
src/cowrie/llm/protocol.py:288
↓ 1 callersMethod_process_queue
Send next queued item if not already sending.
src/cowrie/output/discord.py:88
↓ 1 callersMethod_queue_statements
Append parsed statements to ``cmdpending`` for sequential execution. A subshell is queued as one unit so its join operator (e.g. the || in
src/cowrie/shell/honeypot.py:173
↓ 1 callersMethod_quit_ftp
Quit FTP connection
src/cowrie/commands/ftpget.py:228
↓ 1 callersFunction_raw_data
Serialize the original Cowrie event to a compact JSON string for OCSF's raw_data field. The live event from Twisted carries internal bookkeep
src/cowrie/core/ocsf.py:36
↓ 1 callersMethod_reject_inner_error
Report a syntax error nested anywhere inside a subshell, since the whole line is rejected at parse time. Returns False once reported.
src/cowrie/shell/honeypot.py:197
↓ 1 callersMethod_remove_oldest_keys
Remove keys with the oldest activity when tracker gets too large.
src/cowrie/core/rate_limiter.py:102
↓ 1 callersMethod_reuse_existing_backing
Reuse an existing backing file, truncating if needed.
src/cowrie/shell/pipe.py:252
↓ 1 callersMethod_run_case
``case WORD in PATTERN) BODY ;; ... esac`` -- first match wins.
src/cowrie/shell/honeypot.py:405
↓ 1 callersMethod_run_for
``for VAR in WORDS; do BODY; done`` over the expanded word list.
src/cowrie/shell/honeypot.py:319
↓ 1 callersMethod_run_if
``if COND; then BODY; [elif ...] [else ...] fi``.
src/cowrie/shell/honeypot.py:377
↓ 1 callersMethod_run_while
``while COND; do BODY; done`` (``until`` inverts the test).
src/cowrie/shell/honeypot.py:344
↓ 1 callersMethod_select_fields
Select fields based on the parsed field specification.
src/cowrie/commands/cut.py:103
↓ 1 callersMethod_send_request
Send request to the LLM API.
src/cowrie/llm/llm.py:185
↓ 1 callersMethod_separator_op
The join operator a separator implies: && / || keep their meaning; ``;``, a newline and ``&`` all sequence without gating.
src/cowrie/shell/bashparse.py:399
↓ 1 callersMethod_setup_redirections
Process redirection operations to build the FD table.
src/cowrie/shell/pipe.py:93
↓ 1 callersMethod_skip_to_statement_end
Drop tokens up to (not including) the next statement separator.
src/cowrie/shell/bashparse.py:735
↓ 1 callersMethod_start_retrieval
Start file retrieval
src/cowrie/commands/ftpget.py:205
↓ 1 callersMethod_stringify
(self, val: Any)
src/cowrie/output/discord.py:199
← previousnext →401–500 of 2,302, ranked by callers