Documentation ¶
Index ¶
- func NewTransformWith(run TransformFunc, input ValidEntity, output ...ValidEntity)
- type AuthenticationType
- type BookmarkColor
- type Distribution
- func (d *Distribution) Merge(ed *Distribution)
- func (d *Distribution) RegisterEntity(e ValidEntity)
- func (d *Distribution) RegisterMachine(t Transform)
- func (d *Distribution) RegisterServer(s *TransformServer)
- func (d *Distribution) RegisterTransform(t Transform)
- func (d *Distribution) WriteToFile(path string) (err error)
- type Entity
- func (e *Entity) AddLabel(title, content string)
- func (e *Entity) AddOverlay(value string, pos OverlayPosition, oType OverlayType)
- func (e *Entity) AddProperty(p Field)
- func (e Entity) AsEntity() Entity
- func (e *Entity) Field(name string) *Field
- func (e *Entity) GetGoProperties() (err error)
- func (e *Entity) Property(name string) string
- func (e *Entity) SetBase(base ValidEntity)
- func (e *Entity) SetNote(note string)
- func (e *Entity) Unmarshal(eType ValidEntity) (err error)
- type Exception
- type Field
- type Geneaology
- type Label
- type LineThickness
- type Link
- type LinkDirection
- type LinkShowLabel
- type LinkStyle
- type Machine
- type MachineRunFunc
- type MatchingRule
- type Message
- type MessageUI
- type Overlay
- type OverlayPosition
- type OverlayType
- type Overlays
- type Properties
- type Transform
- func (t *Transform) AddEntity(e ValidEntity) (err error)
- func (t *Transform) AddSetting(s TransformSetting)
- func (t *Transform) AddToSet(set string)
- func (t *Transform) CmdDebugTransformSetting(isDefault bool)
- func (t *Transform) CmdLineTransformSetting(command string, args ...[]string)
- func (t *Transform) CmdWorkDirTransformSetting(path string)
- func (t *Transform) Debugf(format string, args ...interface{})
- func (t *Transform) Errorf(format string, args ...interface{}) error
- func (t *Transform) Infof(format string, args ...interface{})
- func (t *Transform) Warnf(format string, args ...interface{})
- type TransformExceptionMessage
- type TransformFunc
- type TransformResponseMessage
- type TransformServer
- type TransformSetting
- type TransformSettings
- type Transforms
- type ValidEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransformWith ¶
func NewTransformWith(run TransformFunc, input ValidEntity, output ...ValidEntity)
NewTransformWith - Declare a new Transform, with a Run implementation, an Input entity type and any number of OutputEntities. The input/output entities are merely used to check that we will be able to unmarshal Maltego entities into them, by verifying both types match. You'll still need to perform the unmarshalling operation yourself, with entity.Unmarshal().
Types ¶
type AuthenticationType ¶
type AuthenticationType string
AuthenticationType - The Authentication required to access and run a Server's transforms.
const ( AuthenticationNone AuthenticationType = "none" AuthenticationMAC AuthenticationType = "mac" AuthenticationLicense AuthenticationType = "license" )
type BookmarkColor ¶
type BookmarkColor string
BookmarkColor - The color of an Entity bookmark
const ( BOOKMARK_COLOR_NONE BookmarkColor = "-1" BOOKMARK_COLOR_BLUE BookmarkColor = "0" BOOKMARK_COLOR_GREEN BookmarkColor = "1" BOOKMARK_COLOR_YELLOW BookmarkColor = "2" BOOKMARK_COLOR_PURPLE BookmarkColor = "3" BOOKMARK_COLOR_RED BookmarkColor = "4" )
type Distribution ¶
type Distribution struct {
// contains filtered or unexported fields
}
Distribution - A distribution is a set of Entities, Transforms, Machines and all their associated data, optionally strutured into sets and categories. Use this type when you want to produce a Maltego Distribution file (.mtz) to be included into a Maltego Client.
Note that you can also register your Entities/Transforms directly to a server, which can also produce this Distribution, but only for its own context/content.
func NewDistribution ¶
func NewDistribution() Distribution
NewDistribution - Create a new Maltego Distribution, with default operating parameters and empty contents.
func (*Distribution) Merge ¶
func (d *Distribution) Merge(ed *Distribution)
Merge - Given another Maltego Distribution, we are able to merge both into one. This is useful when you don't want to fully overwrite an existing configuration that you have previously loaded from disk. Do NOT use this function if this Distribution is a Server's one, as the Server will not be able to serve the content from the external distribution.
func (*Distribution) RegisterEntity ¶
func (d *Distribution) RegisterEntity(e ValidEntity)
RegisterEntity - Add an Entity to this distribution.
func (*Distribution) RegisterMachine ¶
func (d *Distribution) RegisterMachine(t Transform)
RegisterMachine - Register a Machine to this distribution.
func (*Distribution) RegisterServer ¶
func (d *Distribution) RegisterServer(s *TransformServer)
RegisterServer - Register a new Server to the distribution. This function has the following effects: - It merges the server Distribution contents with its own. - It adds a new Server XML message in its Servers/ section.
func (*Distribution) RegisterTransform ¶
func (d *Distribution) RegisterTransform(t Transform)
RegisterTransform - Register a Transform to this distribution.
func (*Distribution) WriteToFile ¶
func (d *Distribution) WriteToFile(path string) (err error)
WriteToFile - The distribution creates a temporary directory in which it outputs a tree containing its contents, zip it into a Maltego Distribution file (.mtz) and writes it to the specified path. The path must obviously be writable.
type Entity ¶
type Entity struct { // Base properties Namespace string `xml:"-"` // The Maltego namespace of this entity (Maltego entities always fit within a tree) DisplayName string // Defaults to the camelCase-split Entity type if Go native. Alias string `xml:"-"` // The alias under which the Entity can be searched for/ grabbed. Type string `xml:"Type,attr"` // The string representation of the Entity type (determined through reflection) Description string `xml:"-"` Category string `xml:"-"` // The category of entities to which this category belongs (eg: a DNS server => services) Value string `xml:",cdata"` // The value of the Entity, used by the Maltego client Weight int `xml:"Weight"` // The weight attributed to this entity on the graph // Display properties // These properties are all the other properties related to // how the entity is displayed, with its various overlays. Link Link `xml:"-"` // Wraps itself into Properties later. IconURL string `xml:"IconURL,omitempty"` // An optional URL to the Entity main icon Bookmark BookmarkColor `xml:"-"` // Wraps itself into Properties later. Overlays Overlays `xml:"Overlays"` // Access the various overlays by their position. Labels []Label `xml:"DisplayInformation>Label"` // Additional display information // The actual Entity properties, as a list to preserve order. // When this Entity is an Input to a Transform, the underlying // Go type is not automatically populated: you have to call the // Entity.Unmarshal(&YourType{}) method to get it populated. // You'll still be able to access the corresponding fields, but // the returned value type will always be a string. Properties Properties `xml:"AdditionalFields"` // contains filtered or unexported fields }
Entity - A Go representation of a Maltego Entity type. Because the Maltego client might pass Entities inputs that are not Go native types, (or Go types not known to this program), this Entity type contains all properties and details for ANY Entity, no matter its origin, and users have access to many methods to add and query its properties, as well as to set its various Maltego details.
func NewEntity ¶
func NewEntity(data interface{}) Entity
NewEntity - Instantiate a new Entity type. The interface data passed as parameter MUST BE A POINTER TO A STRUCT having some fields tagged with the following list. If this function is successfull, a Transform function will be able to use the interface type as a valid input. The returned Entity type allows you to set all and every Maltego-related settings for the Entity, but not its struct fields: this is because you should not ever need them after this function. Transforms only care about Go native types.
Struct Tags & Type Compliance:
The following is an exhaustive list of all valid and/or required struct field tags for a type to be considered a valid & working Maltego Entity. We take the example of a field named IP, of type string:
display:"IP Address" - Required. The display name of the field in Maltego strict:"yes" - If non nil, the Matching Rule of this field is "strict",
otherwise it's "loose". ("loose"/"strict", default:"loose")
alias:"ipaddress" - The Maltego alias for this field. overlay:"W,image" - Use the field as an overlay: notation is <Position>,<type>.
Valid positions: W, N, S, C, NW, SW Valid types: text, image, colour/color If color is used, must be a valid RGB format (eg. #45e06f)
hidden:"yes" - If not nil, the field is hidden in the Properties Window. sample:"127.0.0.1" - A value used when the Entity is created manually in Maltego. default:"0.0.0.0" - A value that is always populated by default.
func (*Entity) AddLabel ¶
AddLabel - Add a specific Display information to this Entity. If the title argument is nil (""), it will default to "Info".
func (*Entity) AddOverlay ¶
func (e *Entity) AddOverlay(value string, pos OverlayPosition, oType OverlayType)
AddOverlay - Set one of the Entity's overlay items, specifying three things: - Its value, which is MOST OF THE TIME the name of one of the Entity's fields, - Its position, which is a Go enum so that you can't pass an invalid one. - Its type, also as a Go enum to avoid invalid ones.
Note that you can also specify entity fields as overlays when tagging a native Go type fields with the appropriate tags (overlay:"W,text", overlay:"N,image", etc). Please refer to the NewEntity() function documentation for info on these tags.
func (*Entity) AddProperty ¶
AddProperty - Add a field to an Entity base type. You can use this function when you want to add a property to it because the input/output entity is either not a native Go type, or because you don't have access to it, or because you want this field to be added into the Maltego UI but not as a persistent struct field in your Go code.
Note that you can't directly set a field as an overlay when declaring it through this function. You need to reference it again in Entity.AddOverlay().
func (Entity) AsEntity ¶
AsEntity - Self implementation of the Entity interface type. This function is very important for a few reasons:
- You always implicitly return this function from within your own custom implementation of this function with your Go native type.
- When you write a transform that accepts an non-Go native type as an Input Entity, the transform will automatically process this Input Entity into a base type, before handing it to you for query and usage within your transform func.
func (*Entity) Field ¶
Field - Works like Property(): given a property name, returns the corresponding property as a native Go Field type.
func (*Entity) GetGoProperties ¶
GetGoProperties - This function uses reflection to package all valid fields in the struct (as interface) stored by the Entity, as properties. We overwrite them directly each time.
func (*Entity) Property ¶
Property - Returns the string value of a Property field (regardless of its true, underlying type), given the name (key) of the field as argument. If not found, the function returns an empty string.
func (*Entity) SetBase ¶
func (e *Entity) SetBase(base ValidEntity)
SetBase - An entity inherits all the properties of its base Entity, if it has one. Because some of these properties might happen to be settings of various kinds (display labels, icons, etc), this Entity will by default inherit them as well.
You can also set the base for your Entity with struct tags, with base:"yes" (any non-nil "" value is enough).
This function is therefore useful when for some reason, you don't want or cannot embed a type in yours for acting as a Base (ex: when your Entity is a type alias). Call this function within your type's AsEntity() function implementation to overcome the problem, (very) preferably at its beginning so you can override inherited settings.
func (*Entity) Unmarshal ¶
func (e *Entity) Unmarshal(eType ValidEntity) (err error)
Unmarshal - A Maltego entity is being passed a Go native type in which to unmarshal its properties. This function is needed when you want to cast an input entity into your native input type, while retaining the possibility of using the Entity.
type Exception ¶
type Exception string
Exception - Term for an error in a Transform. Can be terminating, or not.
type Field ¶
type Field struct { Name string `xml:"Name,attr"` // The programmatic name, required. Display string `xml:"DisplayName,attr"` // The display name of this field MatchingRule MatchingRule `xml:"MatchingRule,attr"` // The individual match rule for this field Alias string `xml:"-"` // An alias for the field, default to .Name Hidden bool // Hide this field in the Entity Properties window. ReadOnly bool // The user cannot edit this value from the Maltego GUI SampleValue interface{} Value interface{} `xml:",cdata"` // Its value, automatically passed as an XML string }
Field - A property field for a Maltego entity. You can use this type from within a transform, when you want to add a property to it because the input/output entity is either not a native Go type, or because you don't have access to it, or because you want this field to be added into the Maltego UI but not in the persistent Go code.
Note that you can't directly set a field as an overlay when declaring it through this function. You need to reference it again in Entity.AddOverlay().
type Geneaology ¶
Geneaology - A geneaologic node, member of a Geneaology (list of nodes) transmitted in a Maltego Transform Request.
type Label ¶
type Label struct { Name string `xml:"Name,attr"` // The name (key) for the label Content string `xml:",cdata"` // The content, displayed in Maltego Type string `xml:"Type,attr"` // The type of content (if empty, defaults to "text/html") }
Label - Used to convey extra information associated with an Entity in the Maltego client GUI. Unlike entity fields, labels are only transmitted in response messages and cannot be passed from transform to transform as a source of input.
type LineThickness ¶
type LineThickness int
LineThickness - The thickness of a link line between two Entities.
const ( // LineVeryThin - The thinest line for a link LineVeryThin LineThickness = iota // LineThin - A slightly thin link LineThin // LineNormal - Normal thickness for link LineNormal // LineThick - A slightly thick link LineThick // LineVeryThick - The thickest line for a link LineVeryThick )
type Link ¶
type Link struct { Label string Style LinkStyle Thickness LineThickness ShowLabel LinkShowLabel Color string Direction LinkDirection // contains filtered or unexported fields }
Link - Access and set all settings for the link to/from this entity
type LinkDirection ¶
type LinkDirection string
LinkDirection - The directionality of a link to an Entity.
const ( InputToOutputLink LinkDirection = "input-to-output" OutputToInputLink LinkDirection = "output-to-input" Bidirectional LinkDirection = "bidirectional" )
type LinkShowLabel ¶
type LinkShowLabel int
LinkShowLabel - Defines the display options for a link to an entity.
const ( //LinkLabelGlobal - Use the global settings from the Maltego client to // determine if the link should show or hide its label. LinkLabelGlobal LinkShowLabel = iota // LinkLabelShow - Show the label of the link to the Entity, if any. LinkLabelShow // LinkLabelHide - Hide the label of the link to the Entity. LinkLabelHide )
type LinkStyle ¶
type LinkStyle int
LinkStyle - The appearance style of a link to between two Entities.
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine - The Go representation of a Maltego Machine, which is nothing more than Maltego proprietary Macro language: declare transforms to be run under various conditions, in various orders and with varying levels of concurrency, with optional logging functionality, nodes and tree deletion, automatic Maltego Graph saving & screenshot, and more.
The aim of this type of to make Go users able to write a complete machine in Go language, which should be possible given that the Maltego macro language hasn't any complicated branching logic.
func NewMachineOnce ¶
func NewMachineOnce(run MachineRunFunc) Machine
NewMachineOnce - Returns a Machine that will run all of its user-defined actions only once, and return. The type returned contains all the methods you need to access the full functionality spectrum of a native Maltego machine.
However, DO NOT USE ANY LANGUAGE CONSTRUCT OTHER THAN FUNCTIONS PROVIDED BY THE MACHINE. In the future, the Machine parser will maybe support more advanced logic translation, but it will be always limited by the Maltego macro language features.
func NewMachinePerpetual ¶
func NewMachinePerpetual(run MachineRunFunc, interval time.Duration) Machine
NewMachinePerpetual - Returns a Machine that will be ran by the Maltego client at the specified interval parameter (BEWARE: look at how Go time.Duration works)
Other than this, this Machine is STRICTLY identical to the one returned by NewMachineOnce(), and this applies to functionality set it gives you access to.
Therefore, DO NOT USE ANY LANGUAGE CONSTRUCT OTHER THAN FUNCTIONS PROVIDED BY THE MACHINE. In the future, the Machine parser will maybe support more advanced logic translation, but it will be always limited by the Maltego macro language features.
func (*Machine) Run ¶
func (m *Machine) Run()
Run - Run a Go native Transform to which you have access in this program, (and in addition, that has a state and settings that fit your context). TODO: pass a Transform interface as parameter, not a hard type
type MachineRunFunc ¶
MachineRunFunc - A valid Machine script is a Go function that is "self-referencing" a Go native Machine type. Having access to that machine allows you to make use of any of its features, structured in the function the same way they would be structured into a Maltego native Machine script. In fact, all functions that you will call in your function are no more than template generators, which work together to produce a valid Maltego equivalent of your function.
Therefore, DO NOT USE ANY LANGUAGE CONSTRUCT OTHER THAN FUNCTIONS PROVIDED BY THE MACHINE. In the future, the Machine parser will maybe support more advanced logic translation, but it will be always limited by the Maltego macro language features.
type MatchingRule ¶
type MatchingRule string
MatchingRule - Matching rules are used to specify how an entity will be merged in the Maltego user interface. Strict matching specifies that an entity will only be merged with another if all it's fields (including the value) are equal. Loose matching specifies that two entities will be merged if only the entity values are equal.
const ( // MatchStrict - Strict matching specifies that an entity will only be // merged with another if all it's fields (including the value) are equal. MatchStrict MatchingRule = "strict" // MatchLoose - Loose matching specifies that two entities // will be merged if only the entity values are equal. MatchLoose MatchingRule = "loose" )
type Message ¶
type Message struct { // Request Value string `xml:"-"` // Fetched with custom UnmarshalXML Type string `xml:"-"` // Fetched from the Entity Weight int `xml:"Weight"` // Weight of Input Entity Slider int `xml:"-"` // Transform limits, fetched with custom UnmarshalXML Geneaology []Geneaology `xml:"Geneaology"` // All the parent transforms and entities tree Entity Entity `xml:"-"` // A unique input Entity Settings []TransformSetting `xml:"TransformFields"` // Settings for Transform (global/local, and their properties) // Response Response TransformResponseMessage `xml:"MaltegoTransformResponseMessage,omitempty"` Exception TransformExceptionMessage `xml:"MaltegoTransformExceptionMessage,omitempty"` // contains filtered or unexported fields }
Message - A type containing all the output elements of a Transform.
func (Message) UnmarshalXML ¶
UnmarshalXML - The Message type needs to do a bit of custom XML unmarshalling because of unwished lists to process.
type MessageUI ¶
MessageUI - A log message passed along a Transform output for display in the Maltego transform window.
type Overlay ¶
type Overlay struct { PropertyName string `xml:"property_name,attr"` // Either an Entity property name, a URL to an image, etc Position OverlayPosition `xml:"position,attr"` // The relative position of the item relative to the Entity Type OverlayType `xml:"type,attr"` // The type of overlay that we want to show. }
Overlay - An overlay is a piece of information that is displayed at some position relative (close) to the Entity. An overlay can be a piece of text, an image or a color. You specify its position and its value which, for example if the Overlay type is an Image can hold the URL to this image, or in other cases, the name of the Entity property that must be used to find a value.
type OverlayPosition ¶
type OverlayPosition string
OverlayPosition - The position of a Maltego Entity Overlay element.
const ( OverlayNorth OverlayPosition = "N" OverlaySouth OverlayPosition = "S" OverlayWest OverlayPosition = "W" OverlayNorthWest OverlayPosition = "NW" OverlaySouthWest OverlayPosition = "SW" OverlayCenter OverlayPosition = "C" )
type OverlayType ¶
type OverlayType string
OverlayType - The type of a Maltego Entity Overlay element.
const ( OverlayImage OverlayType = "image" OverlayColour OverlayType = "colour" OverlayText OverlayType = "text" )
type Overlays ¶
type Overlays map[OverlayPosition]Overlay
Overlays - Specifies how overlays are stored into an Entity Go type.
func (Overlays) MarshalXML ¶
MarshalXML - Overlays implement the xml.Marshaller interface, to wrap themselves as a valid list of Maltego Overlays XML objects.
type Properties ¶
Properties - Holds all the Properties of an Entity, used to ensure there is no two properties having the same namespace+Name in the list.
func (Properties) MarshalXML ¶
func (p Properties) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
MarshalXML - Properties implement the xml.Marshaller interface, to wrap themselves as a valid list of Maltego Overlays XML objects.
type Transform ¶
type Transform struct { // Base Information configuration.TransformInfo // The user can set this to his wish. Settings TransformSettings // All settings for this transform, and their local configuration. // Operating Parameters Request Message // The incoming Transform request, input Entity, and all transform settings. // contains filtered or unexported fields }
Transform - The base Go implementation of a Maltego transform. This type holds all the information necessary to the correct registration and functioning of an equivalent Maltego Client Transform, and exactly as in the Python code, is NOT restricted to any type of output Entity.
func NewTransform ¶
func NewTransform(name string, run TransformFunc, settings ...TransformSetting) Transform
NewTransform - Instantiate a new Transform by passing a valid Transform function implementation. This leaves you the choice on where you want to declare this function whether it is a type method or a pure function (depends on your needs and code), etc.
The function allows you to pass an optional list of transform settings that you want to apply to this transform AND ONLY THIS ONE. If you want global settings (applying to all transforms served by an HTTP server), pass this settings to the server itself. You can also add settings to the Transform later, through its AddSetting() method. In all cases, you should always register them BEFORE serving the Transforms to their client.
func (*Transform) AddEntity ¶
func (t *Transform) AddEntity(e ValidEntity) (err error)
AddEntity - Add an Entity to the list of entities to be sent in the Transform response. Generally, you want to call it with either yourGoType.AsEntity() function, or directly passing a maltego.Entity type when you can't/don't want to use a native Go type in the Transform.
func (*Transform) AddSetting ¶
func (t *Transform) AddSetting(s TransformSetting)
AddSetting - Before registering your transform to a maltego.TransformServer (or before serving it or generating its configuration file), you can add Settings (as properties).
func (*Transform) AddToSet ¶
AddToSet - Include your transform in a specific set of Transforms, for classification in the Maltego client. You can add your transform to multiple sets, thus you can call this function multiple times.
func (*Transform) CmdDebugTransformSetting ¶
CmdDebugTransformSetting - Add a property for controlling whether the transform is to be ran locally in Debug mode, and the default value.
func (*Transform) CmdLineTransformSetting ¶
CmdLineTransformSetting - Create a new special Transform property for local execution, if the transform is ran locally.
func (*Transform) CmdWorkDirTransformSetting ¶
CmdWorkDirTransformSetting - Specify the working directory to be used when executing the transform locally.
func (*Transform) Errorf ¶
Errorf - Log an error-level message in the Maltego transform window. This function returns the error, so that if you want to terminate the transform because of it, you can "return err" from anywhere.
type TransformExceptionMessage ¶
type TransformExceptionMessage struct {
Exceptions []Exception
}
TransformExceptionMessage - A type containing all the exceptions (errors) that occured during the execution of a Transform. While you can return an error at any point in your code, thereby terminating execution, you can also simply log them with Transform.AddError(), and they will be passed along any other output.
type TransformFunc ¶
TransformFunc - This type defines what is the valid implementation of a Transform in Go code. The transform passed as argument is a "self-reference", which gives you access to all the methods for querying, modifying and adding input/output Entities, as well as some of the core Transform settings. This is another way to register a new valid Maltego transform, without wrapping it around a native Go type implementing maltego.ValidTransform.
Any error returned from the function will be translated into a Maltego Transform exception. You can return an error at any time within your Tranform function implementation.
type TransformResponseMessage ¶
type TransformResponseMessage struct { Entities []Entity `xml:"Entities"` // All entities to be returned as the Transform output. Messages []MessageUI `xml:"UIMessages"` // Transform log messages }
TransformResponseMessage - A type containing all the output elements of a Transform.
type TransformServer ¶
type TransformServer struct { // Information Name string // Generally you don't need to set the name Description string // You can set a description for your Transform Server URL string // Set at runtime when the HTTP server starts, or when config output. LastSync string // Last time the server whas registered, you don't need to set this. Protocol string // You don't need to set the protocol yourself Authentication AuthenticationType // The default authentication is None Enabled bool // The transform server is always enabled by default Transforms Transforms // All user-registered transforms Distribution // The distribution for this server // contains filtered or unexported fields }
TransformServer - A server holding all its registered Transforms, serving them, either through HTTP or through local invocation.
func NewTransformServer ¶
func NewTransformServer(config interface{}) *TransformServer
NewTransformServer - Create a new Transform Server instance, optionally passing a Maltego configuration file (for global transform settings, HTTP security details, etc)
func (*TransformServer) GetTransform ¶
func (ts *TransformServer) GetTransform(path string) *Transform
GetTransform - Find the Transform corresponding to an HTTP URL path.
func (*TransformServer) ListenAndServe ¶
func (ts *TransformServer) ListenAndServe() (err error)
ListenAndServe - The Transform Server starts serving its content, pulling from the current state of its configuration: target address, TLS configuration, transforms settings, etc.
func (*TransformServer) ListenAndServeTLS ¶
func (ts *TransformServer) ListenAndServeTLS(addr string, tlsConfig *tls.Config) (err error)
ListenAndServeTLS - The Transform Server starts serving its content, with an optional TLS configuration passed as argument. If nil, will default on its present configuration state.
func (*TransformServer) RegisterTransform ¶
func (ts *TransformServer) RegisterTransform(t *Transform)
RegisterTransform - Once you have declared/instantiated a Transform in your code, you must register it to a Server with this function. The path at which the Transform is available is automatically set from its properties, and this should match any exported Config.
type TransformSetting ¶
type TransformSetting struct { Name string Description string Default interface{} // The default value CAN ONLY BE a string, boolean or int Optional bool Popup bool }
TransformSetting - An individual Transform Setting, which can be customized by a user in control of a Transform type (through its .Settings field).
type TransformSettings ¶
type TransformSettings struct { Enabled bool RunWithAll bool Favorite bool Accepted bool `xml:"disclaimerAccepted,attr"` ShowHelp bool `xml:"showHelp,attr"` // contains filtered or unexported fields }
TransformSettings - Holds all settings for a Transform, and their local configurations.
func (*TransformSettings) MarshalXML ¶
func (ts *TransformSettings) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
MarshalXML - The Transform Settings implement the xml.Marshaller interface in order to marshal a few of its elements that are not accessible to Transform writers, like Properties.
type Transforms ¶
Transforms - Holds a map of Transforms.
func (Transforms) MarshalXML ¶
func (t Transforms) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
MarshalXML -
type ValidEntity ¶
type ValidEntity interface {
AsEntity() Entity // The type is able to wrap itself into a maltego.Entity
}
ValidEntity - A rather special interface that is paradoxically not intended for use by the writer of an Entity. This is only to make sure that the core Go type declared by the user has a function in which he returns a base Entity type, so that we can use this core Go type as an input in a transform, along with the base Entity type holding all Maltego-related stuff and logic.