def __init__(self, input, filters, out="print"): self.input = input self.out = out self.outwriter = StandardOutWriter() if len(input) > 7 and input[0:7] == "sqlite:": self.filepath = input.split(':')[1] self.func_getvalue = self.sqlite_getvalue self.filters = [ line.strip() for line in open(filters, 'r').readlines() if line[0] != '#' ]
def __init__(self, verbose=False, out="print"): self.host = '' self.nbtname = '' self.smb = None self.maxdepth = 999 self.password = None self.lmhash = None self.nthash = None self.username = '' self.domain = '' self.verbose = verbose if len(out) > 4 and out[0:4] == "csv:": filepath = out.split(':')[1] self.outwriter = CsvOutWriter(filepath) elif len(out) > 7 and out[0:7] == "sqlite:": filepath = out.split(':')[1] self.outwriter = SqliteOutWriter(filepath) else: self.outwriter = StandardOutWriter()