MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetState

Method GetState

workflow.cpp:203–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202
203string WorkflowMachine::GetState()
204{
205 rapidjson::Document request(rapidjson::kObjectType);
206 rapidjson::Document::AllocatorType& allocator = request.GetAllocator();
207 request.AddMember("command", "status", allocator);
208 rapidjson::StringBuffer buffer;
209 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
210 request.Accept(writer);
211
212 string jsonResult;
213 if (m_function)
214 jsonResult = BNPostWorkflowRequestForFunction(m_function->GetObject(), buffer.GetString());
215 else
216 jsonResult = BNPostWorkflowRequestForBinaryView(m_view->GetObject(), buffer.GetString());
217
218 rapidjson::Document response(rapidjson::kObjectType);
219 response.Parse(jsonResult.c_str());
220 if (response.HasMember("machineState") && response["machineState"].HasMember("state"))
221 return response["machineState"]["state"].GetString();
222
223 return "Invalid";
224}
225
226
227std::pair<bool, bool> WorkflowMachine::GetLogStatus()

Callers

nothing calls this directly

Calls 6

AddMemberMethod · 0.80
c_strMethod · 0.80
HasMemberMethod · 0.80
GetObjectMethod · 0.45
GetStringMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected