Class Formatter


  • public class Formatter
    extends Object
    The formatter class is used to print formatted output for the enum and guess operations.
    Author:
    Tobias Neitzel (@qtc_de)
    • Constructor Detail

      • Formatter

        public Formatter()
    • Method Detail

      • listBoundNames

        public void listBoundNames​(RemoteObjectWrapper[] remoteObjects)
        Creates a formatted list of available bound names and their corresponding classes. Classes are divided in known classes (classes that are available on the current class path) and unknown classes (not available on the current class path). Furthermore, some other meta information for each bound name is printed (TCP endpoint + ObjID).
        Parameters:
        remoteObjects - Array of RemoteObjectWrappers obtained from the RMI registry
      • listGuessedMethods

        public void listGuessedMethods​(List<RemoteObjectClient> results)
        Prints a formatted list of successfully guessed remote methods.
        Parameters:
        results - Array of RemoteObjectClients containing the successfully guessed methods
      • listCodebases

        public void listCodebases()
        Lists enumerated codebases exposed by the RMI server. The corresponding information is fetched from a static method on the CodebaseCollector class. It returns a HashMap that maps codebases to classes that their annotated with it. This function prints this HashMap in a human readable format.
      • listKnownEndpoint

        public void listKnownEndpoint​(KnownEndpoint knownEndpoint)
        Prints the meta information contained in a KnownEndpoint in formatted way. This function generates the output that is displayed when using remote-method-guesser's 'known' action.
        Parameters:
        knownEndpoint - The KnownEndpoint to print