Skip to content

Commit

Permalink
Merge pull request #111 from intezer/feat/add-phishing-sdk-exampke
Browse files Browse the repository at this point in the history
feat/add-phishing-sdk-example
  • Loading branch information
matany90 authored Aug 8, 2023
2 parents 5f2132e + dc26482 commit ec9f0f8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/send_phishing_email.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import io
import sys
from pprint import pprint

from intezer_sdk import api
from intezer_sdk.alerts import Alert

def send_phishing_email(path_to_eml_file):
api.set_global_api('<api_key>')

with open(path_to_eml_file, 'rb') as file:
binary_data = io.BytesIO(file.read())

alert = Alert.send_phishing_email(raw_email=binary_data)
pprint(alert.alert_id)


if __name__ == '__main__':
send_phishing_email(*sys.argv[1:])

0 comments on commit ec9f0f8

Please sign in to comment.