(self, pkt)
return data
Based on what verbosity level is set, parse
            the packet and return formatted data.
Based on what verbosity level is set, parse
            the packet and return formatted data.
Based on what verbosity level is set parse the packet and return formatted data .
def pull_output(self, pkt):
        """ Based on what verbosity level is set, parse
            the packet and return formatted data.
        """
        verb = self.config['verb'].value
        data = pkt.getlayer(Raw).load.rstrip()
        if verb is 1:
            # parse the site only
            data = re.findall('Host: (.*)', data)
            if len(data) > 0:
                data = data[0]
            else:
                data = None
        elif verb is 2:
            data = data.split('\n')
            if len(data) > 0:
                data = data[0]
            else:
                data = None
        elif verb is 3:
            pass
        elif verb is 4:
            data = self.manage_sessions(data)
        elif verb is 5:
            data = self.config['regex'].value.search(data)
            if not data is None:
                data = data.group(0)
        return data
def pull_output ( self , pkt ) : verb = self . config [ 'verb' ] . value data = pkt . getlayer ( Raw ) . load . rstrip ( ) if verb is 1 : # parse the site only data = re . findall ( 'Host: (.*)' , data ) if len ( data ) > 0 : data = data [ 0 ] else : data = None elif verb is 2 : data = data . split ( '\n' ) if len ( data ) > 0 : data = data [ 0 ] else : data = None elif verb is 3 : pass elif verb is 4 : data = self . manage_sessions ( data ) elif verb is 5 : data = self . config [ 'regex' ] . value . search ( data ) if not data is None : data = data . group ( 0 ) return data