Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JohnHammond/katana
/ functions
Functions
398 in github.com/JohnHammond/katana
⨍
Functions
398
◇
Types & classes
126
↳
Endpoints
1
↓ 100 callers
Method
join
Wait for all work to complete. Depending on your Finder and Target, this may take some time, and may time out before completion. Aft
katana/manager.py:512
↓ 79 callers
Method
get
Get a configuration value with a default. If a value was specified under the `DEFAULT` section, it will be returned before the defaul
katana/unit.py:298
↓ 72 callers
Method
register_data
Register arbitrary data results with the manager
katana/manager.py:239
↓ 20 callers
Method
katana_test
Perform a test with the given configuration, target and flag :param config: Katana configuration file :type config: str :par
tests/__init__.py:79
↓ 19 callers
Method
register_artifact
Register an artifact result with the manager
katana/manager.py:229
↓ 18 callers
Method
geti
same as get but returns an integer value
katana/unit.py:312
↓ 14 callers
Method
find_flag
Search arbitrary data for flags matching the given flag format in the manager configuration
katana/manager.py:267
↓ 14 callers
Method
queue_target
Create a target, enumerate units, queue them, and return the target object
katana/manager.py:344
↓ 13 callers
Method
generate_artifact
Generate a new artifact, and return the path and open file handle. The artifact is not automatically registered with the manager, since it
katana/unit.py:242
↓ 13 callers
Method
get_name
By default, we assume the unit name is the same as the containing module. This can be overridden, but should not conflict with other units.
katana/unit.py:148
↓ 11 callers
Function
parse_int
This function will parse out a Python value regardless of the representation a number is given in the provided string. It will detect hex
katana/units/crypto/rsa.py:259
↓ 10 callers
Method
get_result
(self, results, unit)
katana/monitor.py:154
↓ 9 callers
Method
match
Match the given target to one or more units that have previously been enumerated with the ``Finder.find`` method. This tests that the
katana/unit.py:418
↓ 8 callers
Method
_api
Perform an API request to the specified endpoint :param endpoint: the endpoint to query (e.g. /user/login) :param args: Argum
katana/repl/pico.py:24
↓ 8 callers
Method
get_output_dir
Find the output directory for this unit. This will return the directory where artifacts are expected to be stored in this context and also e
katana/unit.py:213
↓ 8 callers
Function
replace
(pattern, replacement)
katana/units/esoteric/__jsfuck.js:146
↓ 8 callers
Method
start
Start the needed threads and begin evaluation of units. You can still add units to the queue for evaluation after start is called up
katana/manager.py:485
↓ 6 callers
Method
__init__
Setup the unit. The constructor should evaluate the target and make sure it makes sense to run. If the provided target does not make
katana/unit.py:97
↓ 6 callers
Function
is_good_magic
Checks if the magic type is in a list of known interesting file types
katana/util.py:21
↓ 6 callers
Method
reset
(self)
katana/units/stego/dtmf_decode.py:49
↓ 5 callers
Method
_signal_complete
Send work items with high priority to signal closing down threads
katana/manager.py:600
↓ 5 callers
Function
process_tasks
Part of the Git Dumper procedure. Process tasks in parallel.
katana/units/web/git.py:156
↓ 4 callers
Function
create_intermediate_dirs
Part of the Git Dumper procedure. Create intermediate directories, if necessary
katana/units/web/git.py:78
↓ 4 callers
Method
run
(self)
katana/units/web/git.py:132
↓ 4 callers
Function
setDecoded
(decodedCode)
katana/units/esoteric/__jsfuck.js:339
↓ 3 callers
Method
build_results
(self, target=None)
katana/monitor.py:168
↓ 3 callers
Method
check
(self, filename)
katana/units/stego/dtmf_decode.py:196
↓ 3 callers
Function
evaluate_brainfuck
This function actually runs the provided Brainfuck operations and returns the standard output. :param code: The code to run as Brainfuck
katana/units/esoteric/brainfuck.py:67
↓ 3 callers
Method
find
Locate units which conform to the Katana unit specification with the given directory. All python source file within the directory will
katana/unit.py:382
↓ 3 callers
Method
generate_prompt
(self, about_to_wait=False)
katana/repl/__init__.py:384
↓ 3 callers
Method
get_challenge
(self, ident: int)
katana/repl/ctfd.py:198
↓ 3 callers
Function
isMatching
(string, pattern)
katana/units/esoteric/__jsfuck.js:332
↓ 3 callers
Method
is_complete
Returns true if either this unit or the origin target has completed
katana/unit.py:192
↓ 3 callers
Method
on_completion
This is called upon completion of evaluation (after manager.join() is complete). `timed_out` indicates if we reached a timeout.
katana/monitor.py:90
↓ 3 callers
Method
on_exception
Notify the monitor that an exception occurred while processing a given unit. The exception is passed as the `exc` parameter
katana/monitor.py:76
↓ 3 callers
Function
patternCreator
(prefix, postfix)
katana/units/esoteric/__jsfuck.js:325
↓ 3 callers
Method
scoreboard
( self, localize: User = None, count=10, bracket: Bracket = None )
katana/repl/ctfd.py:151
↓ 3 callers
Function
unword
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:25
↓ 2 callers
Method
__init__
(self, *args, **kwargs)
katana/units/web/git.py:588
↓ 2 callers
Method
__init__
(self, manager: Manager)
katana/repl/__init__.py:315
↓ 2 callers
Method
_parse_challenge
Parse the result of a challenge/problem request (either from /problem or from a specific problem) :param result: The result dictionar
katana/repl/pico.py:213
↓ 2 callers
Function
crypt1
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:80
↓ 2 callers
Function
decode_from_whitespace
This is a convenience function to decode a binary sequence. :param binary_sequence: A string of 1's and 0's. :return: The converted dat
katana/units/stego/whitespace.py:18
↓ 2 callers
Method
generate_solution
(self, flag)
katana/repl/__init__.py:1047
↓ 2 callers
Function
get_indexed_files
Part of the Git Dumper procedure. Return all the files in the directory index webpage.
katana/units/web/git.py:53
↓ 2 callers
Function
get_referenced_sha1
Part of the Git Dumper procedure. Return all the referenced SHA1 in the given object file
katana/units/web/git.py:94
↓ 2 callers
Function
is_html
Return True if the response is a HTML webpage
katana/units/web/git.py:48
↓ 2 callers
Function
isword
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:18
↓ 2 callers
Method
on_artifact
Notify the monitor that an artifact was found and may be of interest to store in a file. This may be a temporary file already open (w
katana/monitor.py:57
↓ 2 callers
Method
on_download_update
Called at most once per second while downloading files for targets
katana/monitor.py:94
↓ 2 callers
Method
on_flag
Notify the monitor that a flag was found
katana/monitor.py:70
↓ 2 callers
Method
on_work
Keep track of the thread statuses for asynchronous status updates
katana/monitor.py:26
↓ 2 callers
Method
queue
Queue the given unit to be evaluated. This will add the unit to the queue given it's prioritization, and the unit will be evaluated once
katana/manager.py:441
↓ 2 callers
Method
register_flag
Register a flag that was found during processing and raise the FoundFlag exception.
katana/manager.py:256
↓ 2 callers
Method
rem_unit
Remove a unit for tracking. Also sets completed if all units are done.
katana/target.py:329
↓ 2 callers
Function
shift_char
This is a convenience function that will perform the most primitive operation of the Caesar Cipher -- shifting one character by a given a
katana/units/crypto/caesar.py:26
↓ 2 callers
Function
shift_char
This is a convenience function that will perform the most primitive operation of the Caesar Cipher -- shifting one character by a given a
katana/units/crypto/keyed_caesar.py:26
↓ 2 callers
Method
submit
(self, challenge: Challenge, flag: str)
katana/repl/ctfd.py:228
↓ 2 callers
Method
target
Build a new target in the context of this manager
katana/manager.py:323
↓ 2 callers
Method
update_prompt
Updates the prompt with the current state
katana/repl/__init__.py:445
↓ 1 callers
Method
__init__
(self)
katana/monitor.py:18
↓ 1 callers
Method
_authenticate
(self, username: str, password: str)
katana/repl/pico.py:74
↓ 1 callers
Method
_authenticate
Authenticate with the remote CTF instance. Raise AuthenticationError on failure. :param username: A valid username :
katana/repl/ctf.py:129
↓ 1 callers
Method
_get_solves
Get the list of solves for this user :return: List of challenges we have solved
katana/repl/ctfd.py:123
↓ 1 callers
Method
_prepare_results
Prepare the results directory to house all artifacts and results from this run of katana. This is automatically called when `start` is
katana/manager.py:704
↓ 1 callers
Method
abort
Signal completion to all threads, then wait for exit
katana/manager.py:586
↓ 1 callers
Method
add_unit
Add a unit for tracking. This is called by Manager.queue
katana/target.py:325
↓ 1 callers
Function
affine
Perform the affine cipher for a single letter. :c: An integer value for the given letter (its location within the alphabet) :a: An in
katana/units/crypto/affine.py:28
↓ 1 callers
Function
attempt_ocr
Run tesseract against an image file and return the string found :param image_path: The path to an image file. :return: The string deter
katana/units/ocr/tesseract.py:22
↓ 1 callers
Function
build_jumpmap
This is used for the Cow operations. It will match opening and closing braces for use within the Cow program. :param code: A byte string
katana/units/esoteric/cow.py:52
↓ 1 callers
Method
build_target
This method does the resource intensive part of building the target. It is done in a separate thread to decrease the time to return from the
katana/target.py:131
↓ 1 callers
Function
buildbracemap
This is used for the Brainfuck operations. It will match opening and closing braces for use within the Brainfuck program. :param code: A
katana/units/esoteric/brainfuck.py:42
↓ 1 callers
Method
calc_coeffs
(self)
katana/units/stego/dtmf_decode.py:190
↓ 1 callers
Method
can_recurse
Checks recursion rules and returns whether or not recursion is allowed into the given unit class. This unit has already been matched
katana/unit.py:165
↓ 1 callers
Method
check_deps
The default dependency check will make sure that every item in self.DEPENDENCIES exists as an external executable in the current
katana/unit.py:317
↓ 1 callers
Method
clean_up_processing
(self)
katana/units/stego/dtmf_decode.py:120
↓ 1 callers
Function
cleanup
This is used for the Cow operations. It will clean the provided code to only find the appropriate Cow operators. :param code: A byte str
katana/units/esoteric/cow.py:34
↓ 1 callers
Function
contfrac_to_rational
This function is used for the Weiner's Little D attack. Converts a finite continued fraction ``[a0, ..., an]`` to an x/y rational.
katana/units/crypto/rsa.py:67
↓ 1 callers
Function
convergents_from_contfrac
This function is used for the Weiner's Little D attack. Computes the list of convergents using the list of partial quotients :param fra
katana/units/crypto/rsa.py:50
↓ 1 callers
Function
crypt2
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:88
↓ 1 callers
Function
crz
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:64
↓ 1 callers
Function
decodeSubstitute
This is stolen from https://github.com/rallip/substituteBreaker All it does is use the ``requests`` module to send the ciphertext to quip
katana/units/crypto/quipqiup.py:35
↓ 1 callers
Method
decode_one
(self, number)
katana/units/crypto/t9.py:82
↓ 1 callers
Function
decryptFence
Stolen from https://github.com/tothi/railfence. This is a convenience function to decrypt data with the Railfence cipher. :param ci
katana/units/crypto/railfence.py:70
↓ 1 callers
Method
do_rot47
Shamelessly stolen from https://rot47.net/_py/rot47.txt This function takes a string and performs the ROT47 operation on it
katana/units/crypto/rot47.py:49
↓ 1 callers
Method
do_task
(self, task, *args)
katana/units/web/git.py:152
↓ 1 callers
Method
download
Begin the streaming download of a URL. :param url: the URL to download :type url: str :param blocksize: The size of
katana/manager.py:157
↓ 1 callers
Function
egcd
This function is used for the Weiner's Little D attack. Determines the Euclidean Greatest Common Denominator between given values.
katana/units/crypto/rsa.py:83
↓ 1 callers
Function
encryptFence
Stolen from https://github.com/tothi/railfence. This is a convenience function to encrypt data with the Railfence cipher. :param pl
katana/units/crypto/railfence.py:28
↓ 1 callers
Method
enumerate
r""" Yield cases for evaluation given the target and manager configuration. This allows units with multiple possible evaluations (such
katana/unit.py:196
↓ 1 callers
Method
evaluate
r""" Run unit tasks given `case` which was returned from `Unit.enumerate`. This could happen in any thread or process of execution and
katana/unit.py:207
↓ 1 callers
Function
evaluate_cow
This function actually runs the provided Cow operations and returns the standard output. :param code: The code to run as Cow. :para
katana/units/esoteric/cow.py:78
↓ 1 callers
Function
evaluate_ook
This function will actually evaluate the Ook code, by translating it to Brainfuck character mapping and then passing it to the ``evaluate
katana/units/esoteric/ook.py:35
↓ 1 callers
Function
execute
This function is execute Malbolge code.
katana/units/esoteric/malbolge.py:163
↓ 1 callers
Function
execute_step
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:124
↓ 1 callers
Function
fetch_git
Dump a .git repository into the output directory. This is the core function of the https://github.com/arthaud/git-dumper code.
katana/units/web/git.py:355
↓ 1 callers
Function
fillMissingChars
()
katana/units/esoteric/__jsfuck.js:114
↓ 1 callers
Function
fillMissingDigits
()
katana/units/esoteric/__jsfuck.js:122
↓ 1 callers
Function
findMissing
()
katana/units/esoteric/__jsfuck.js:208
↓ 1 callers
Function
find_cube_root
This function is used for the Cube Root attack. Determines the cube root of a number. :param n: The number to determine the cube root o
katana/units/crypto/rsa.py:139
next →
1–100 of 398, ranked by callers