You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,28 @@ The Falcon Sandbox Python API Connector (e.g. for https://www.hybrid-analysis.co
13
13
> Using Debian/Ubuntu OS, this can be done by calling `sudo apt-get install python3-pip`. It will then be available via `pip3`
14
14
> Using Windows, this can be done automatically when installing `python` (proper checkbox on the installer has to be checked). It should be available via `pip`
15
15
16
+
Versions
17
+
---
18
+
19
+
### V2
20
+
21
+
This version has broad support for all capabilities of VxWebService APIv2 and much more. New features include:
Copy file name to clipboardExpand all lines: api/callers/api_caller.py
+38-55Lines changed: 38 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
fromexceptionsimportResponseObjectNotExistError
3
3
fromexceptionsimportUrlBuildError
4
4
fromexceptionsimportJsonParseError
5
-
fromrequests.authimportHTTPBasicAuth
5
+
fromexceptionsimportConfigError
6
6
importjson
7
7
8
8
@@ -20,7 +20,6 @@ class ApiCaller:
20
20
CONST_API_AUTH_LEVEL_SUPER=1000
21
21
22
22
api_key=''
23
-
api_secret=''
24
23
25
24
server=''
26
25
endpoint_url=''
@@ -34,16 +33,14 @@ class ApiCaller:
34
33
api_unexpected_error_msg='Unexpected error has occurred (HTTP code: {}). Please try again later or contact with the support'
35
34
api_unexpected_error_404_msg='Unexpected error has occurred (HTTP code: {}). This error is mostly occurring when called webservice is outdated and so does not support current action. If you believe it is an error, please contact with the support'
36
35
api_success_msg='Your request was successfully processed by Falcon Sandbox'
37
-
api_expected_error_msg='API error has occurred. HTTP code: {}, API error code: {}, message: \'{}\''
38
-
response_msg_success_nature=False
36
+
api_expected_error_msg='API error has occurred. HTTP code: {}, message: \'{}\''
39
37
40
-
api_response=None
38
+
api_response=None# TODO - rebuild the way how we set those values to use abstract methods instead
raiseConfigError('Got redirect while trying to reach server URL. Please try to update it and pass the same URL base which is visible in the browser URL bar. '
71
+
'For example: it should be \'https://www.hybrid-analysis.com\', instead of \'http://www.hybrid-analysis.com\' or \'https://hybrid-analysis.com\'')
ifself.api_expected_data_type==self.CONST_EXPECTED_DATA_TYPE_JSONandbool(self.api_response.json()) isTrue: # Sometimes response can has status code different than 200 and store json with error msg
0 commit comments