MCPcopy Create free account

hub / github.com/JohnHammond/katana / functions

Functions398 in github.com/JohnHammond/katana

↓ 100 callersMethodjoin
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 callersMethodget
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 callersMethodregister_data
Register arbitrary data results with the manager
katana/manager.py:239
↓ 20 callersMethodkatana_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 callersMethodregister_artifact
Register an artifact result with the manager
katana/manager.py:229
↓ 18 callersMethodgeti
same as get but returns an integer value
katana/unit.py:312
↓ 14 callersMethodfind_flag
Search arbitrary data for flags matching the given flag format in the manager configuration
katana/manager.py:267
↓ 14 callersMethodqueue_target
Create a target, enumerate units, queue them, and return the target object
katana/manager.py:344
↓ 13 callersMethodgenerate_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 callersMethodget_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 callersFunctionparse_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 callersMethodget_result
(self, results, unit)
katana/monitor.py:154
↓ 9 callersMethodmatch
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 callersMethod_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 callersMethodget_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 callersFunctionreplace
(pattern, replacement)
katana/units/esoteric/__jsfuck.js:146
↓ 8 callersMethodstart
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 callersMethod__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 callersFunctionis_good_magic
Checks if the magic type is in a list of known interesting file types
katana/util.py:21
↓ 6 callersMethodreset
(self)
katana/units/stego/dtmf_decode.py:49
↓ 5 callersMethod_signal_complete
Send work items with high priority to signal closing down threads
katana/manager.py:600
↓ 5 callersFunctionprocess_tasks
Part of the Git Dumper procedure. Process tasks in parallel.
katana/units/web/git.py:156
↓ 4 callersFunctioncreate_intermediate_dirs
Part of the Git Dumper procedure. Create intermediate directories, if necessary
katana/units/web/git.py:78
↓ 4 callersMethodrun
(self)
katana/units/web/git.py:132
↓ 4 callersFunctionsetDecoded
(decodedCode)
katana/units/esoteric/__jsfuck.js:339
↓ 3 callersMethodbuild_results
(self, target=None)
katana/monitor.py:168
↓ 3 callersMethodcheck
(self, filename)
katana/units/stego/dtmf_decode.py:196
↓ 3 callersFunctionevaluate_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 callersMethodfind
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 callersMethodgenerate_prompt
(self, about_to_wait=False)
katana/repl/__init__.py:384
↓ 3 callersMethodget_challenge
(self, ident: int)
katana/repl/ctfd.py:198
↓ 3 callersFunctionisMatching
(string, pattern)
katana/units/esoteric/__jsfuck.js:332
↓ 3 callersMethodis_complete
Returns true if either this unit or the origin target has completed
katana/unit.py:192
↓ 3 callersMethodon_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 callersMethodon_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 callersFunctionpatternCreator
(prefix, postfix)
katana/units/esoteric/__jsfuck.js:325
↓ 3 callersMethodscoreboard
( self, localize: User = None, count=10, bracket: Bracket = None )
katana/repl/ctfd.py:151
↓ 3 callersFunctionunword
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:25
↓ 2 callersMethod__init__
(self, *args, **kwargs)
katana/units/web/git.py:588
↓ 2 callersMethod__init__
(self, manager: Manager)
katana/repl/__init__.py:315
↓ 2 callersMethod_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 callersFunctioncrypt1
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:80
↓ 2 callersFunctiondecode_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 callersMethodgenerate_solution
(self, flag)
katana/repl/__init__.py:1047
↓ 2 callersFunctionget_indexed_files
Part of the Git Dumper procedure. Return all the files in the directory index webpage.
katana/units/web/git.py:53
↓ 2 callersFunctionget_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 callersFunctionis_html
Return True if the response is a HTML webpage
katana/units/web/git.py:48
↓ 2 callersFunctionisword
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:18
↓ 2 callersMethodon_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 callersMethodon_download_update
Called at most once per second while downloading files for targets
katana/monitor.py:94
↓ 2 callersMethodon_flag
Notify the monitor that a flag was found
katana/monitor.py:70
↓ 2 callersMethodon_work
Keep track of the thread statuses for asynchronous status updates
katana/monitor.py:26
↓ 2 callersMethodqueue
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 callersMethodregister_flag
Register a flag that was found during processing and raise the FoundFlag exception.
katana/manager.py:256
↓ 2 callersMethodrem_unit
Remove a unit for tracking. Also sets completed if all units are done.
katana/target.py:329
↓ 2 callersFunctionshift_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 callersFunctionshift_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 callersMethodsubmit
(self, challenge: Challenge, flag: str)
katana/repl/ctfd.py:228
↓ 2 callersMethodtarget
Build a new target in the context of this manager
katana/manager.py:323
↓ 2 callersMethodupdate_prompt
Updates the prompt with the current state
katana/repl/__init__.py:445
↓ 1 callersMethod__init__
(self)
katana/monitor.py:18
↓ 1 callersMethod_authenticate
(self, username: str, password: str)
katana/repl/pico.py:74
↓ 1 callersMethod_authenticate
Authenticate with the remote CTF instance. Raise AuthenticationError on failure. :param username: A valid username :
katana/repl/ctf.py:129
↓ 1 callersMethod_get_solves
Get the list of solves for this user :return: List of challenges we have solved
katana/repl/ctfd.py:123
↓ 1 callersMethod_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 callersMethodabort
Signal completion to all threads, then wait for exit
katana/manager.py:586
↓ 1 callersMethodadd_unit
Add a unit for tracking. This is called by Manager.queue
katana/target.py:325
↓ 1 callersFunctionaffine
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 callersFunctionattempt_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 callersFunctionbuild_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 callersMethodbuild_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 callersFunctionbuildbracemap
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 callersMethodcalc_coeffs
(self)
katana/units/stego/dtmf_decode.py:190
↓ 1 callersMethodcan_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 callersMethodcheck_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 callersMethodclean_up_processing
(self)
katana/units/stego/dtmf_decode.py:120
↓ 1 callersFunctioncleanup
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 callersFunctioncontfrac_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 callersFunctionconvergents_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 callersFunctioncrypt2
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:88
↓ 1 callersFunctioncrz
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:64
↓ 1 callersFunctiondecodeSubstitute
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 callersMethoddecode_one
(self, number)
katana/units/crypto/t9.py:82
↓ 1 callersFunctiondecryptFence
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 callersMethoddo_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 callersMethoddo_task
(self, task, *args)
katana/units/web/git.py:152
↓ 1 callersMethoddownload
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 callersFunctionegcd
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 callersFunctionencryptFence
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 callersMethodenumerate
r""" Yield cases for evaluation given the target and manager configuration. This allows units with multiple possible evaluations (such
katana/unit.py:196
↓ 1 callersMethodevaluate
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 callersFunctionevaluate_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 callersFunctionevaluate_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 callersFunctionexecute
This function is execute Malbolge code.
katana/units/esoteric/malbolge.py:163
↓ 1 callersFunctionexecute_step
This function is used as part of Malbolge's operations.
katana/units/esoteric/malbolge.py:124
↓ 1 callersFunctionfetch_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 callersFunctionfillMissingChars
()
katana/units/esoteric/__jsfuck.js:114
↓ 1 callersFunctionfillMissingDigits
()
katana/units/esoteric/__jsfuck.js:122
↓ 1 callersFunctionfindMissing
()
katana/units/esoteric/__jsfuck.js:208
↓ 1 callersFunctionfind_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