44import requests
55import sys
66
7+ from json import dumps as json_dumps
8+
79from .exceptions import IntelOwlClientException
810from .token_auth import APIToken
911
@@ -28,7 +30,7 @@ def session(self):
2830 session .headers .update (
2931 {
3032 "Authorization" : "Token {}" .format (str (self .token )),
31- "User-Agent" : "IntelOwlClient/1.3.4 " ,
33+ "User-Agent" : "IntelOwlClient/1.3.5 " ,
3234 }
3335 )
3436 self ._session = session
@@ -87,7 +89,7 @@ def send_file_analysis_request(
8789 "file_name" : filename ,
8890 }
8991 if runtime_configuration :
90- data ["runtime_configuration" ] = runtime_configuration
92+ data ["runtime_configuration" ] = json_dumps ( runtime_configuration )
9193 files = {"file" : (filename , binary )}
9294 url = self .instance + "/api/send_analysis_request"
9395 response = self .session .post (url , data = data , files = files )
@@ -128,7 +130,7 @@ def send_observable_analysis_request(
128130 ),
129131 }
130132 if runtime_configuration :
131- data ["runtime_configuration" ] = runtime_configuration
133+ data ["runtime_configuration" ] = json_dumps ( runtime_configuration )
132134 url = self .instance + "/api/send_analysis_request"
133135 response = self .session .post (url , data = data )
134136 logger .debug (response .url )
0 commit comments