'data <sid> [-t type] [-x] [-u]
Get the scan data for scan ID <sid> and optionally the element
type [type] (e.g. EMAILADDR), [type]. Use -x for extended format.
Use -u for a unique set of results.'

def do_data(self, line):

    c = self.myparseline(line)
    if (len(c[0]) < 1):
        self.edprint('Invalid    syntax.')
        return
    post = {'id': c[0][0]}
    if ('-t' in c[0]):
        post['eventType'] = c[0][(c[0].index('-t') + 1)]
    else:
        post['eventType'] = 'ALL'
    if ('-u' in c[0]):
        url = (self.ownopts['cli.server_baseurl'] + '/scaneventresultsunique')
    else:
        url = (self.ownopts['cli.server_baseurl'] + '/scaneventresults')
    d = self.request(url, post=post)
    if (not d):
        return
    j = json.loads(d)
    if (len(j) < 1):
        self.dprint('No    results.')
        return
    if ('-u' in c[0]):
        titles = {'0': 'Data'}
    else:
        titles = {'10': 'Type', '1': 'Data'}
    if ('-x' in c[0]):
        titles['0'] = 'Last    Seen'
        titles['3'] = 'Module'
        titles['2'] = 'Source    Data'
    d = d.replace('&lt;/SFURL&gt;', '').replace('&lt;SFURL&gt;', '')
    self.send_output(d, line, titles=titles)
