mailpillager.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:SPF 作者: Exploit-install 项目源码 文件源码
def scrapeContacts(self):
        if (not self.srv):
            return

        self.getMessages()

        contacts = []
        for (server_msg, body, octets) in self.msg_list:
            mail = email.message_from_string('\n'.join(body))
            for part in mail.walk():
                fromaddr = part['from']
                if (fromaddr):
                    sender = part['from'].split()[-1]
                    address = re.sub(r'[<>]','',sender)
                    # Ignore any occurences of own email address and add to list
                    if not re.search(r'' + re.escape(self.user),address) and not address in contacts:
                        contacts.append(address)
                        print "IDENTIFED new contact [%s]" % (address)

        return contacts
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号