csvout
index
/usr/local/lib/python2.7/site-packages/dshell/lib/output/csvout.py

@author: tparker

 
Modules
       
output
util

 
Classes
       
output.TextOutput(output.FileOutput)
CSVOutput

 
class CSVOutput(output.TextOutput)
    CSV Output module
use with --output=csvout,[,data,customfield[:type],...] (a list of field:types to append to end of default format)
add [,file=...[,mode=...]] to write to outfile (or use -w arg on cmdline)
add format=... to replace the default fields or use a format string
add delim= to change delimeter from comma
 
 
Method resolution order:
CSVOutput
output.TextOutput
output.FileOutput
output.Output
__builtin__.object

Methods defined here:
__init__(self, *args, **kwargs)
sets up an output module, be sure to call Output.__init__ first or last
args will have the name of the module as args[0], anything else after

Methods inherited from output.TextOutput:
alert(self, *args, **kw)
write an alert record
we pass in the decoder object and args/dict

Methods inherited from output.FileOutput:
close(self)
close output if not stdout
write(self, obj, **kw)
write session data to the session output or stdout

Methods inherited from output.Output:
dispatch(self, m, *args, **kwargs)
dispatch from Q pop
dump(self, pkt=None, **kw)
dump raw packet data to an output
override this if you want a format other than pcap
log(self, msg, level=20, *args, **kw)
write a message to the log
passes all args and kwargs thru to logging
except for level= is used to set logging level
parse(self, *args, **kw)
parse the input args/kwargs into a record dict according to format string
- timestamps are formatted to date/time strings
        - fields not in the input will be defined but blank
        - extra fields in the record will be formatted into a
               "name=value name2=value2..." string and put in 'extra'
        - args will go into 'data'
        - format keyword can contain a new format string to use (this also sets format for future output)
setformat(self, formatstr=None, typemap=None)
parse a format string and extract the field info
        if no string given, reverts to default for class
   will set self.fields to be a list of (name,type,spec) tuples
   self.fieldnames to a list of fieldnames
        and self.fieldmap to a list of key=in value=out mappings
format string can also map in field to out field with %(in:out)spectype
 or specify an explicit out type with %(in:out)specintype:outtype
(note this breaks compatibility with text formatting,
  but useful for db or other output modules)
  a typemap of [intype]=outtype (or [in]=(newintype,outtype)
                  can be used to map and replace types

Data descriptors inherited from output.Output:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
obj = class CSVOutput(output.TextOutput)
    CSV Output module
use with --output=csvout,[,data,customfield[:type],...] (a list of field:types to append to end of default format)
add [,file=...[,mode=...]] to write to outfile (or use -w arg on cmdline)
add format=... to replace the default fields or use a format string
add delim= to change delimeter from comma
 
 
Method resolution order:
CSVOutput
output.TextOutput
output.FileOutput
output.Output
__builtin__.object

Methods defined here:
__init__(self, *args, **kwargs)
sets up an output module, be sure to call Output.__init__ first or last
args will have the name of the module as args[0], anything else after

Methods inherited from output.TextOutput:
alert(self, *args, **kw)
write an alert record
we pass in the decoder object and args/dict

Methods inherited from output.FileOutput:
close(self)
close output if not stdout
write(self, obj, **kw)
write session data to the session output or stdout

Methods inherited from output.Output:
dispatch(self, m, *args, **kwargs)
dispatch from Q pop
dump(self, pkt=None, **kw)
dump raw packet data to an output
override this if you want a format other than pcap
log(self, msg, level=20, *args, **kw)
write a message to the log
passes all args and kwargs thru to logging
except for level= is used to set logging level
parse(self, *args, **kw)
parse the input args/kwargs into a record dict according to format string
- timestamps are formatted to date/time strings
        - fields not in the input will be defined but blank
        - extra fields in the record will be formatted into a
               "name=value name2=value2..." string and put in 'extra'
        - args will go into 'data'
        - format keyword can contain a new format string to use (this also sets format for future output)
setformat(self, formatstr=None, typemap=None)
parse a format string and extract the field info
        if no string given, reverts to default for class
   will set self.fields to be a list of (name,type,spec) tuples
   self.fieldnames to a list of fieldnames
        and self.fieldmap to a list of key=in value=out mappings
format string can also map in field to out field with %(in:out)spectype
 or specify an explicit out type with %(in:out)specintype:outtype
(note this breaks compatibility with text formatting,
  but useful for db or other output modules)
  a typemap of [intype]=outtype (or [in]=(newintype,outtype)
                  can be used to map and replace types

Data descriptors inherited from output.Output:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        __warningregistry__ = {("Not importing directory '/wrkdirs/usr/ports/net/...k/Dshell-46e691c/lib/output': missing __init__.py", <type 'exceptions.ImportWarning'>, 5): True}