-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Korczynski <david@adalogics.com>
- Loading branch information
1 parent
5ef9b75
commit 87680ce
Showing
1 changed file
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,30 @@ | ||
# Fuzz Introspector core | ||
# Fuzz Introspector Python Package | ||
|
||
Library for analysing fuzzer-relevant components of source code. | ||
|
||
Example: | ||
|
||
```python | ||
from fuzz_introspector.frontends import core | ||
|
||
SAMPLE="""void parse(const char *data, size_t size) { | ||
return; | ||
} | ||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | ||
parse((const char*)data, size) | ||
} | ||
""" | ||
|
||
source = core.analyse_source_file(SAMPLE, 'c') | ||
func = source.get_function_node('LLVMFuzzerTestOneInput') | ||
if func: | ||
print(func.callsites()) | ||
``` | ||
|
||
Running the above: | ||
|
||
```sh | ||
$ python3 example.py | ||
[('parse', (122, 127))] | ||
``` |