def __get_inspected_objs(self, source_file): email1 = EmailMessage() email1.from_ = '*****@*****.**' email1.to = '*****@*****.**' email1.subject = 'Subject1' email1.date = DateTime('21-06-2015T19:52:00') email1.add_related(source_file, "Extracted_From", inline=False) return [email1]
def main(): m = EmailMessage() m.from_ = ["*****@*****.**", "*****@*****.**", "*****@*****.**"] m.from_.condition = "Equals" m.subject = "New modifications to the specification" m.subject.condition = "Equals" print(Observables(m).to_xml())
def main(): m = EmailMessage() m.to = ["*****@*****.**", "*****@*****.**"] m.from_ = "*****@*****.**" m.subject = "New modifications to the specification" a = Address("192.168.1.1", Address.CAT_IPV4) m.add_related(a, "Received_From", inline=False) print(Observables([m, a]).to_xml(encoding=None))
def main(): NS = cybox.utils.Namespace("http://example.com/", "example") cybox.utils.set_id_namespace(NS) m = EmailMessage() m.from_ = ["*****@*****.**", "*****@*****.**", "*****@*****.**"] m.from_.condition = "Equals" m.subject = "New modifications to the specification" m.subject.condition = "Equals" print(Observables(m).to_xml())
def main(): NS = cybox.utils.Namespace("http://example.com/", "example") cybox.utils.set_id_namespace(NS) m = EmailMessage() m.from_ = ["*****@*****.**", "*****@*****.**", "*****@*****.**"] m.from_.condition = "Equals" m.subject = "New modifications to the specification" m.subject.condition = "Equals" print Observables(m).to_xml()
def main(): NS = cybox.utils.Namespace("http://example.com/", "example") cybox.utils.set_id_namespace(NS) m = EmailMessage() m.to = ["*****@*****.**", "*****@*****.**"] m.from_ = "*****@*****.**" m.subject = "New modifications to the specification" a = Address("192.168.1.1", Address.CAT_IPV4) m.add_related(a, "Received_From", inline=False) print Observables([m, a]).to_xml()
def main(): NS = cybox.utils.Namespace("http://example.com/", "example") cybox.utils.set_id_namespace(NS) m = EmailMessage() m.to = ["*****@*****.**", "*****@*****.**"] m.from_ = "*****@*****.**" m.subject = "New modifications to the specification" a = Address("192.168.1.1", Address.CAT_IPV4) m.add_related(a, "Received_From", inline=False) print(Observables([m, a]).to_xml())
def main(): print '<?xml version="1.0" encoding="UTF-8"?>' attachment = File() attachment.file_name = "FooBar Specification (critical revision).doc" attachment.add_hash(Hash("4EC0027BEF4D7E1786A04D021FA8A67F")) email = EmailMessage() email.attachments.append(attachment) email.subject = String("New modifications to the specification") email.to = EmailRecipients(EmailAddress("*****@*****.**"), EmailAddress("*****@*****.**")) email.from_ = EmailAddress("*****@*****.**") print Observables(email).to_xml()
def main(): NS = cybox.utils.Namespace("http://example.com/", "example") cybox.utils.set_id_namespace(NS) # �I�u�W�F�N�g�̍쐬�iEmailMesage) m = EmailMessage() # �I�u�W�F�N�g�Ɋ֘A�t�� m.to = ["*****@*****.**", "*****@*****.**"] m.from_ = "*****@*****.**" m.subject = "New modifications to the specification" # �I�u�W�F�N�g�̍쐬�iAdress) a = Address("192.168.1.1", Address.CAT_IPV4) # �I�u�W�F�N�g�Ԃ̊֘A m.add_related(a, "Received_From", inline=False) a.add_related(m, "Received_to", inline=False) print Observables([m, a]).to_xml()