Skip to content

Commit 2295940

Browse files
committed
fixed example in Detection class docstring
1 parent eeed6de commit 2295940

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

fireeyepy/__init__.py

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,50 @@
88
logger = logging.getLogger("fireeye")
99

1010
class Detection:
11-
"""The Detection class allows your app to communicate with FireEye's Detection On Demand service.add()
12-
13-
The Detection On Demand service provides the ability for you to submit files and md5sum hashes for malware analysis.add()
11+
"""The Detection class allows your app to communicate with FireEye's Detection On Demand service.add()
12+
13+
The Detection On Demand service provides the ability for you to submit files and md5sum hashes for malware analysis.add()
1414
15-
This client handles constructing and sending HTTP requests to Detection On Demand as well as parsing any responses received.
15+
This client handles constructing and sending HTTP requests to Detection On Demand as well as parsing any responses received.
1616
1717
18-
Keyword Arguments:
19-
key {string} -- The API key provided to you by the Detection On Demand service.
18+
Keyword Arguments:
19+
key {string} -- The API key provided to you by the Detection On Demand service.
2020
2121
22-
Example of sending a file in for malware analysis.
23-
```python
24-
import fireeyepy
22+
Example of sending a file in for malware analysis.
23+
```python
24+
import fireeyepy
2525
26-
detection = fireeyepy.Detection(key="yourapikeyhere")
26+
detection = fireeyepy.Detection(key="yourapikeyhere")
2727
28-
result = detection.submit_file(
29-
files={
30-
"file": ("filenamehere.txt", open(path/to/filenamehere.txt", "r"))
31-
}
32-
)
33-
```
28+
result = detection.submit_file(
29+
files={
30+
"file": ("filenamehere.txt", open("path/to/filenamehere.txt", "r"))
31+
}
32+
)
33+
```
34+
------------------------------
3435
35-
Example of getting a file result from a previous analysis
36-
```python
37-
import fireeyepy
36+
Example of getting a file result from a previous analysis
37+
```python
38+
import fireeyepy
3839
39-
detection = fireeyepy.Detection(key="yourapikeyhere")
40+
detection = fireeyepy.Detection(key="yourapikeyhere")
4041
41-
result = detection.get_file_result("yoursubmissionkey")
42-
```
42+
result = detection.get_file_result("yoursubmissionkey")
43+
```
44+
------------------------------
4345
44-
Example of getting the results of a hash that was previously analyzed.
45-
```python
46-
import fireeyepy
46+
Example of getting the results of a hash that was previously analyzed.
47+
```python
48+
import fireeyepy
4749
48-
detection = fireeyepy.Detection(key="yourapikeyhere")
50+
detection = fireeyepy.Detection(key="yourapikeyhere")
4951
50-
result = detection.get_hash_lookup(hash="md5sumhashhere")
51-
```
52-
"""
52+
result = detection.get_hash_lookup(hash="md5sumhashhere")
53+
```
54+
"""
5355
def __init__(self,key=None):
5456
self.api_key = key or os.environ.get("FIREEYE_API_KEY", None)
5557
self.api_host = "feapi.marketplace.apps.fireeye.com"

0 commit comments

Comments
 (0)