Skip to content

Commit

Permalink
core: adjust README (#1896)
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <david@adalogics.com>
  • Loading branch information
DavidKorczynski authored Dec 16, 2024
1 parent 5ef9b75 commit 87680ce
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/README.md
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))]
```

0 comments on commit 87680ce

Please sign in to comment.