Skip to content

Commit 8be48e7

Browse files
authored
Merge pull request #107 from intezer/modify/change-var-name
modify/change-var-name
2 parents 312de31 + 3a06700 commit 8be48e7

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Currently, the following options are available in the SDK:
1717
- IOCs, Dynamic TTPs and Capabilities
1818
- Strings related samples
1919
- Search a family
20+
- Ingest an alert from any source
21+
- Ingest a raw email alert (.msg or .eml file)
2022

2123
## Installation
2224

intezer_sdk/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.18.3'
1+
__version__ = '1.18.4'

intezer_sdk/alerts.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def send(cls,
227227

228228
@classmethod
229229
def send_phishing_email(cls,
230-
raw_alert: BinaryIO,
230+
raw_email: BinaryIO,
231231
api: IntezerApiClient = None,
232232
environment: Optional[str] = None,
233233
default_verdict: Optional[str] = None,
@@ -238,7 +238,7 @@ def send_phishing_email(cls,
238238
"""
239239
Send an alert for further investigation using the Intezer Analyze API.
240240
241-
:param raw_alert: The raw alert data.
241+
:param raw_email: The raw alert data.
242242
:param api: The API connection to Intezer.
243243
:param environment: The environment of the alert.
244244
:param default_verdict: The default verdict to send the alert with.
@@ -250,12 +250,12 @@ def send_phishing_email(cls,
250250
resulting alert object will be initialized with the alert triage data.
251251
"""
252252
_api = IntezerApi(api or get_global_api())
253-
if not bool(raw_alert.getvalue()):
253+
if not bool(raw_email.getvalue()):
254254
raise ValueError('alert cannot be empty')
255255

256256
send_alert_params = dict(
257-
alert=raw_alert,
258-
file_name=cls._parse_alert_id_from_alert_stream(raw_alert),
257+
alert=raw_email,
258+
file_name=cls._parse_alert_id_from_alert_stream(raw_email),
259259
alert_source='phishing_emails',
260260
environment=environment,
261261
display_fields=','.join(['sender', 'received', 'subject', 'message_id', 'to']),

tests/unit/test_alerts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_ingest_binary_alert_success(self):
111111
status=HTTPStatus.OK,
112112
json={'result': True, 'alert_id': alert_id})
113113
# Act
114-
alert = Alert.send_phishing_email(raw_alert=raw_alert,
114+
alert = Alert.send_phishing_email(raw_email=raw_alert,
115115
alert_sender='alert_sender')
116116

117117
# Assert

0 commit comments

Comments
 (0)