Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JusticeRage/FFM
/ functions
Functions
450 in github.com/JusticeRage/FFM
⨍
Functions
450
◇
Types & classes
72
↓ 73 callers
Function
write_str
Function used to print strings to stdout. :param s: The string to print. :param level: The importance of the message. Either INFO, WARNIN
model/driver/input_api.py:75
↓ 41 callers
Function
shell_exec
r""" Executes a command in the shell. The command is wrapped with explicit begin/end markers so completion does not depend on prompt detec
model/driver/input_api.py:311
↓ 31 callers
Function
shell_quote
Quotes a string so it can be safely embedded into a shell command. :param value: The string to quote. :return: A shell-escaped version of
model/driver/input_api.py:95
↓ 31 callers
Method
write
(self, chunk)
commands/download_directory.py:34
↓ 30 callers
Method
append
Append a character or a string to the input buffer at the position designated by the cursor. :param c: The character to appen
model/driver/input.py:129
↓ 24 callers
Function
register_plugin
(plugin)
commands/command_manager.py:32
↓ 20 callers
Function
write
Shorthand function that prints data to stdout. Mainly here to make the code more readable, and provide a single place to redirect writes if n
model/driver/input_api.py:40
↓ 16 callers
Method
apply
(self, user_input)
processors/ssh_command_line.py:36
↓ 15 callers
Method
_backwards_move
This function computes the number of lines and columns that separate two positions in the input buffer on the screen. :param:
model/driver/input.py:416
↓ 14 callers
Method
_forward_move
This function computes the number of lines and columns that separate two positions in the input buffer on the screen. :param:
model/driver/input.py:457
↓ 12 callers
Method
draw_current_line
Prints the current line and positions the cursor accordingly. It is expected that the line has been erased before calling this functi
model/driver/input.py:173
↓ 12 callers
Function
write_str_internal
Shorthand function which directly prints a string to stdout. In particular, this function bypasses any logging. Plugin developers should
model/driver/input_api.py:62
↓ 10 callers
Function
check_command_existence
Verifies that a given command exists on the machine. :param cmd: The command whose existence we want to check. :return: True if the comma
model/driver/input_api.py:382
↓ 10 callers
Function
get_commands
This function splits a command line to return a list of invoked programs without their arguments. Example: "cat file ; echo "aaa" | less"
misc/string_utils.py:143
↓ 10 callers
Method
pop
Removes the last characters of the input buffer (based on the cursor). :param amount: The number of characters to remove.
model/driver/input.py:110
↓ 10 callers
Function
strip
Standard strip function, but for whole strings instead of chars. Note that the strings are each evaluated in order and only tested once.
misc/string_utils.py:117
↓ 9 callers
Method
clear_line
Entirely deletes the current line. This is useful if it needs to be redrawn, for instance if the window has been resized.
model/driver/input.py:157
↓ 8 callers
Method
_send_input
(self, s)
test/test_input_driver.py:210
↓ 8 callers
Function
find_last_of
Finds the last instance of a char from the given group in a string. :param s: The string to search. :param chars: The group of characters
misc/string_utils.py:61
↓ 8 callers
Function
pass_command
Simply passes a command to the underlying shell. The output is completely ignored. :param command: The command to run. :return: None
model/driver/input_api.py:298
↓ 7 callers
Function
find_last_not_of
Finds the last instance of a char in a string which is not in the given group. :param s: The string to search. :param chars: The group of
misc/string_utils.py:78
↓ 7 callers
Function
get_config_boolean
Returns a boolean config value while tolerating direct bool assignments in tests. :param config: The ConfigParser-like object holding the con
misc/config_utils.py:5
↓ 7 callers
Method
go_to_eol
Moves the caret to the end of the buffer on the screen. It works by simply redrawing the line, as the caret will be put at the end au
model/driver/input.py:367
↓ 7 callers
Method
name
()
commands/command_manager.py:146
↓ 7 callers
Method
update
(self, amount)
test/command/test_transfer_commands.py:39
↓ 6 callers
Method
apply
(self, user_input)
processors/assert_torify.py:40
↓ 6 callers
Method
description
()
commands/command_manager.py:150
↓ 6 callers
Function
get_arguments
This function is used to retrieve the arguments of a specific command in a command line. This can be useful if the command line is composed o
misc/string_utils.py:195
↓ 6 callers
Function
get_last_word
Returns the last word contained in a string. :param s: The string whose last word we want. :param boundary: The characters which delimit
misc/string_utils.py:95
↓ 6 callers
Method
handle_input
(self, typed_char)
model/driver/base.py:23
↓ 6 callers
Method
relative_caret_move
Move the caret relatively to its current position. :param x: The number of lines to move. Negative numbers go upwards. :param
model/driver/input.py:382
↓ 6 callers
Method
tag
()
commands/command_manager.py:154
↓ 5 callers
Method
_backwards_word_move
Moves the cursor backwards until the beginning of the current word (or the next one, if we're not currently in a word). :para
model/driver/input.py:498
↓ 5 callers
Method
_forward_word_move
Moves the cursor forward until after the current word (or the next one, if we're not currently in a word). :param word_charac
model/driver/input.py:533
↓ 5 callers
Method
execute
(self)
test/command/test_command_manager.py:20
↓ 5 callers
Function
find_first_of
Finds the first instance of a char from a list in the given string. :param s: The string into which the characters should be searched. :p
misc/string_utils.py:29
↓ 5 callers
Method
get_line_up_to_cursor
:return: The current line up to the cursor's position.
model/driver/input.py:146
↓ 5 callers
Method
go_to_sol
This function places the cursor and the caret on screen at the beginning of the input buffer. This is the behavior traditionally asso
model/driver/input.py:352
↓ 5 callers
Function
parse_commands
(command_line)
commands/command_manager.py:46
↓ 5 callers
Method
print_character
(self, c)
model/driver/input.py:257
↓ 4 callers
Function
_import_command_manager
()
test/command/test_command_manager.py:8
↓ 4 callers
Function
_new_marker
Generates a marker that is unlikely to appear in command output. :return: A random ascii marker as bytes.
model/driver/input_api.py:113
↓ 4 callers
Method
_search_history
(self, start_index=None)
model/driver/input.py:627
↓ 4 callers
Method
apply
(self, user_input)
processors/rdesktop_command_line.py:35
↓ 4 callers
Method
backspace
Handles the backspace (^H) character.
model/driver/input.py:186
↓ 4 callers
Function
find_first_not_of
Finds the first instance of a char not a given list in a string. :param s: The string into which the characters should be searched. :para
misc/string_utils.py:45
↓ 3 callers
Method
_build_archive
(self, members, mode="w:gz")
test/command/test_transfer_commands.py:163
↓ 3 callers
Method
_get_interpreter
This method returns the name of the interpreter that should be used to run the remote script. :return:
commands/remote_script.py:41
↓ 3 callers
Method
_run_command
( self, interpreter_presence, interpreter_versions, *args, program_con
test/command/test_remote_script_command.py:112
↓ 3 callers
Method
_state_entry_clear
(self)
model/driver/input.py:726
↓ 3 callers
Method
cursor_back
Moves the on-screen caret back one position, going up to the previous line if needed. :param adjust_internal_cursor: Whether the inte
model/driver/input.py:287
↓ 3 callers
Method
cursor_forward
Moves the on-screen caret forward one position, going down to the next line if needed. :param adjust_internal_cursor: Whether the int
model/driver/input.py:271
↓ 3 callers
Method
execute
(self)
commands/download_directory.py:150
↓ 3 callers
Method
handle_bytes
(self, b)
model/driver/base.py:26
↓ 3 callers
Method
perform_tab_completion
This function is called when the user wants to complete the currently typed input. The current word will be completed as much as poss
model/driver/input.py:303
↓ 3 callers
Function
register_processor
(plugin)
processors/processor_manager.py:29
↓ 3 callers
Method
type
()
processors/assert_torify.py:83
↓ 2 callers
Function
_build_exec_command
Wraps a command with explicit begin/end markers so the harness can detect completion without relying on the prompt. :param command: The c
model/driver/input_api.py:123
↓ 2 callers
Method
_cancel_history_search
(self)
model/driver/input.py:677
↓ 2 callers
Method
_execute_script
(self, command_cls, script_contents, *script_args)
test/command/test_remote_script_command.py:43
↓ 2 callers
Function
_import_command_manager
(files)
test/test_module_loading.py:8
↓ 2 callers
Method
_refresh_history_search
(self)
model/driver/input.py:670
↓ 2 callers
Method
_rendered_line
(self)
model/driver/input.py:598
↓ 2 callers
Method
_run_download_case
(self, xxd_available)
test/command/test_transfer_commands.py:44
↓ 2 callers
Method
_state_ground
(self, c)
model/driver/input.py:731
↓ 2 callers
Function
apply_processors
Applies the input processor to the command line which was typed by a user. :param user_input: The command line that is about to be passed to
processors/processor_manager.py:58
↓ 2 callers
Method
disable_logging
Function which disables any logging currently in place. :return: True if it succeeded, False otherwise.
commands/log_control.py:39
↓ 2 callers
Method
execute
(self)
commands/enumeration_commands.py:485
↓ 2 callers
Method
execute
(self)
commands/notty_sudo.py:51
↓ 2 callers
Function
file_exists
Tests whether a file exists. :param path: The path to test. :return: True if the file exists, False otherwise.
model/driver/input_api.py:356
↓ 2 callers
Function
get_tmpfs_folder
Finds a tmpfs directory suitable for most operations. The citeria are: - RW permissions - The noexec flag is not set. :return: A suit
model/driver/input_api.py:397
↓ 2 callers
Function
is_directory
Tests whether a given file is a directory. :param path: The path to test :return: True if the file is a directory.
model/driver/input_api.py:369
↓ 2 callers
Method
name
()
model/plugin/command.py:33
↓ 2 callers
Function
shell_join
Quotes and joins a sequence of shell arguments. :param values: Iterable of argument values. :return: A shell-safe command-line fragment.
model/driver/input_api.py:104
↓ 2 callers
Method
usage
()
commands/command_manager.py:158
↓ 1 callers
Method
_accept_history_search
(self)
model/driver/input.py:689
↓ 1 callers
Method
_advance_history_search
(self)
model/driver/input.py:660
↓ 1 callers
Method
_assert_dirwalk_quotes_path
(self, module)
test/command/test_shell_hardening.py:62
↓ 1 callers
Method
_assert_shred_quotes_path
(self, module)
test/command/test_shell_hardening.py:89
↓ 1 callers
Method
_assert_strange_dirs_quotes_paths
(self, module)
test/command/test_shell_hardening.py:39
↓ 1 callers
Method
_backwards_move_absolute
(self, move_length, start_offset)
model/driver/input.py:606
↓ 1 callers
Method
_build_context
(self)
test/command/test_remote_script_command.py:109
↓ 1 callers
Method
_csi_dispatch
(self, c)
model/driver/input.py:893
↓ 1 callers
Method
_ensure_parent_chain_is_not_symlink
(self, member_name)
commands/download_directory.py:123
↓ 1 callers
Method
_esc_dispatch
(self, c)
model/driver/input.py:850
↓ 1 callers
Method
_extract_archive
(self, archive_path)
commands/download_directory.py:134
↓ 1 callers
Method
_get_command_line
The command line which should be called to execute the script. :return:
commands/remote_script.py:49
↓ 1 callers
Method
_get_heredoc_delimiter
(script_contents)
commands/remote_script.py:65
↓ 1 callers
Method
_get_interpreter
(self)
commands/remote_elf.py:84
↓ 1 callers
Method
_get_output_cleaner
An optional function to clean up the output. :return:
commands/remote_script.py:57
↓ 1 callers
Method
_get_remote_archive_command
(self)
commands/download_directory.py:94
↓ 1 callers
Method
_get_syscall_check_command
(self)
commands/remote_elf.py:105
↓ 1 callers
Function
_load_command_modules
()
commands/command_manager.py:165
↓ 1 callers
Function
_load_processor_modules
()
processors/processor_manager.py:83
↓ 1 callers
Function
_read_all_output
r""" Reads all the output of a command from the current terminal. When explicit markers are provided, output is collected until the end ma
model/driver/input_api.py:144
↓ 1 callers
Method
_start_history_search
(self)
model/driver/input.py:647
↓ 1 callers
Method
_state_history_search
(self, c)
model/driver/input.py:705
↓ 1 callers
Function
_stream_output
Streams a command's output from the current terminal to a callback until the explicit end marker is found. :param timeout: The maximum am
model/driver/input_api.py:239
↓ 1 callers
Method
_validate_member_name
(self, member_name)
commands/download_directory.py:105
↓ 1 callers
Method
caret_at_eol
(self)
model/driver/input.py:402
next →
1–100 of 450, ranked by callers