示例#1
0
 def __parse_get(self, flow, buf):
     hdrs = []
     for k, v in self.hdr_re.findall(buf):
         k = k.strip(' ')
         if ' ' not in k:
             v = html.decode(html.strip(v))
             v = v.strip(' [Add]') # XXX - addrs
             v = v.split(' \xa0')[0] # XXX - date
             hdrs.append((k, v))
     m = self.body_re.search(buf)
     if hdrs and m:
         self.publish_email(hdrs, m.group('body'))
示例#2
0
 def __parse_get(self, flow, buf):
     hdrs = []
     for k, v in self.hdr_re.findall(buf):
         k = k.strip(' ')
         if ' ' not in k:
             v = html.decode(html.strip(v))
             v = v.strip(' [Add]')  # XXX - addrs
             v = v.split(' \xa0')[0]  # XXX - date
             hdrs.append((k, v))
     m = self.body_re.search(buf)
     if hdrs and m:
         self.publish_email(hdrs, m.group('body'))
示例#3
0
 def __parse_get(self, flow, buf):
     hdrs = self.hdrs_re.search(buf).group('hdrs')
     hdrs = [
         (
             k.strip(':'),
             # XXX - hack around HREFs in From: value
             html.decode(html.strip(v.split('  ')[0])))
         for k, v in self.hdr_re.findall(buf)
     ]
     d = dict(hdrs)
     # XXX - track client addrs by IP - should use cookie instead?
     self.client_addrs[flow.client.addr] = d.get('To', '')
     body = self.body_re.search(buf).group('body')
     if hdrs and body:
         self.publish_email(hdrs, body)
示例#4
0
 def __parse_get(self, flow, buf):
     hdrs = self.hdrs_re.search(buf).group("hdrs")
     hdrs = [
         (
             k.strip(":"),
             # XXX - hack around HREFs in From: value
             html.decode(html.strip(v.split("  ")[0])),
         )
         for k, v in self.hdr_re.findall(buf)
     ]
     d = dict(hdrs)
     # XXX - track client addrs by IP - should use cookie instead?
     self.client_addrs[flow.client.addr] = d.get("To", "")
     body = self.body_re.search(buf).group("body")
     if hdrs and body:
         self.publish_email(hdrs, body)
示例#5
0
文件: hotmail.py 项目: dugsong/dsniff
 def __parse_get(self, flow, buf):
     m = self.hdrs_body_re.search(buf)
     body = m.group('body')
     hdrs = [ (k.replace(' ', '').strip(':'), html.decode(v))
              for k, v in self.hdr_re.findall(m.group('hdrs')) ]
     self.publish_email(hdrs, body)
示例#6
0
 def __parse_get(self, flow, buf):
     m = self.hdrs_body_re.search(buf)
     body = m.group('body')
     hdrs = [(k.replace(' ', '').strip(':'), html.decode(v))
             for k, v in self.hdr_re.findall(m.group('hdrs'))]
     self.publish_email(hdrs, body)