call-siteslisted
Install: claude install-skill vulhunt-re/skills
# Call Sites
Find function call sites in a binary.
## When to use
- Find all locations where a specific function is called
- Identify callers of a function
- Check if a function contains calls to other specific functions
- Filter call sites based on caller criteria
## Instructions
### List function calls
Using the VulHunt MCP tools, open the project (`open_project`) and run the following Lua query (`query_project`) to get all the function calls:
```lua
local calls = project:calls_matching{
to = <target_call>,
}
local results = {}
for _, call in ipairs(calls) do
table.insert(results, {
caller_address = tostring(call.caller_address),
call_address = tostring(call.call_address),
})
end
return results
```
Possible values for `<target_call>`:
- A string, e.g. `"system"`
- An AddressValue
- VulHunt APIs return addresses as AddressValue instances
- Create one with `AddressValue.new(<hex_addr>)` (e.g., `<hex_addr> = 0x1234`)
- A regex, e.g. `{matching = "<regex>", kind = "symbol"}`
- A byte pattern, e.g. `{matching = "41544155", kind = "bytes"}`
Returns a JSON object containing:
- `caller_address` is the address of the function that makes the call
- `call_address` is the address of the call site (specifically, the code block address where the call is made)
#### List function calls with criteria
To restrict the search to function calls where the caller also contains other calls, or the caller is a specific function, use:
```lua
local calls = project: