Package ioids :: Module tools
[hide private]
[frames] | no frames]

Module tools

source code

Tools module for IOIDS

Inter-Organisational Intrusion Detection System (IOIDS)

Check README in the IOIDS folder for more information.


Author: Michael Pilgermann

Contact: mailto:mpilgerm@glam.ac.uk

License: GPL (General Public License)

Functions [hide private]
 
printAction(indent, text, linebreak=0, out=stdout)
Prints a line for an action and puts the cursor on a predefined column.
source code
 
finishActionLine(sucess='\x1b[32;01m OK \x1b[0m')
Finishes a line as prepared by printAction.
source code
 
requestInput(indent, prompt, default=None)
Prompts the user for input.
source code
Variables [hide private]
  oneindent = ' '
  SUCESS_POS = '\x1b[32;01m OK \x1b[0m'
  SUCESS_NEG = '\x1b[31;01mFAILED\x1b[0m'
  SUCESS_SKIP = '\x1b[33;01m SKIP \x1b[0m'
  SUCESS_WARN = '\x1b[33;01m !! \x1b[0m'
  COLUMN_SUCESS = 80
  COLUMN_INPUT = 70
  LENGTH_LINE = 89
Function Details [hide private]

printAction(indent, text, linebreak=0, out=stdout)

source code 

Prints a line for an action and puts the cursor on a predefined column.

Usually, no line break is written, the line should be finished after performing an action using the function finishActionLine.

finishActionLine(sucess='\x1b[32;01m OK \x1b[0m')

source code 

Finishes a line as prepared by printAction.

Puts the given sucess string in brackets.