spamtrap_backend.core package
Subpackages
- spamtrap_backend.core.processor package
- Submodules
- spamtrap_backend.core.processor.base_processor module
- spamtrap_backend.core.processor.dionaea_processor module
- spamtrap_backend.core.processor.mail_processor module
MailProcessor
MailProcessor.MSG_THRESHOLD
MailProcessor.RE_PASS_PATTERNS
MailProcessor.RE_URL
MailProcessor.channels
MailProcessor.extract_attachments()
MailProcessor.extract_domains()
MailProcessor.extract_urls()
MailProcessor.extract_urls_dm()
MailProcessor.find_extern()
MailProcessor.find_receiver()
MailProcessor.find_sender()
MailProcessor.is_public_ip()
MailProcessor.process()
MailProcessor.retrieve_datetime_in_utc()
MailProcessor.retrieve_header_field()
MailProcessor.retrieve_mtas()
MailProcessor.sanitize_address()
MailProcessor.search_pass()
- spamtrap_backend.core.processor.processor module
- Module contents
Submodules
spamtrap_backend.core.database module
- class spamtrap_backend.core.database.DatabaseHandler(host, port, database_name, indexttl=None)
Bases:
object
- collection_map = {<class 'spamtrap_backend.datamodels.Email'>: CollectionEnum.email, <class 'spamtrap_backend.datamodels.FeedMsg'>: CollectionEnum.raw, <class 'spamtrap_backend.datamodels.File'>: CollectionEnum.file, <class 'spamtrap_backend.datamodels.NetworkEntity'>: CollectionEnum.network_entity, <class 'spamtrap_backend.datamodels.NetworkEvent'>: CollectionEnum.events, <class 'spamtrap_backend.datamodels.Url'>: CollectionEnum.url}
- async connect_db(io_loop=None)
- async ensure_index(indexttl=2592000)
- async find_file_by_sha512(sha512)
- async init_db()
- async insert_dm(elem)
- async insert_file(elem)
- async insert_generic(_id, elem)
- async insert_gridfs(filename, data, metadata=None)
- async insert_network_entity(_id, elem)
- async insert_url(_id, elem)
- is_database_up()
Synchronous check of availability of DB host (pymongo is needed anyway).
- async retrieve_file(file_id, out_file='./retrieved_')
spamtrap_backend.core.mediator module
spamtrap_backend.core.message_ingestor module
- class spamtrap_backend.core.message_ingestor.AMQPIngestor(ident, secret, host, port, vhost, exchange, routing_key, tls, check_cert)
Bases:
MessageIngestor
- async ingest(queue)
- class spamtrap_backend.core.message_ingestor.HpFeedIngestor(ident, secret, host, port, channels, tls)
Bases:
MessageIngestor
- async ingest(queue)