How to get all calls to a FunctionValue in python #12393
Replies: 1 comment 3 replies
-
I think the reason we're not resolving the calls to If what you want is to simply locate these request handlers, then I would suggest using API graphs instead. Something like moduleImport("http")
.getMember('server')
.getMember('BaseHTTPRequestHandler')
.getASubclass*()
.getMember('do_GET') (untested) should be enough to locate the exists(string method_name |
moduleImport("http")
.getMember('server')
.getMember('BaseHTTPRequestHandler')
.getASubclass*()
.getMember(method_name) and
method_name.matches("do\_%")
) At any rate, I would not recommend using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am looking for a correct way to get a caller.
I am using the class FunctionValue to enumerate all the functions in a file as below:
and it gives me four functions:
1 Function helloHandler.do_GET
2 Function helloHandler.do_POST
3 Function helloHandler.respond
4 Function main
However, when I would like to get if there is a call calls those functions by "getACall()" as below:
it only return one result as below.
1 Function main | ControlFlowNode for main()
I am pretty sure there are calls in function do_GET and do_POST call the FunvtionValue "Function helloHandler.respond".
But not present in the result.
I was wondering how to get the calls correctly.
My python code sample is like below:
The complete code can be found in https://github.com/BaiChienKao/SbomTestP1_01262023/blob/main/WebServer.py
Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions