This tool allow you to check if your binary contains any function banned in your current subject. It was made to be used in an automated CI.
Warning: The program will only run on UNIX systems.
Note: The program is only tested on NixOS.
Nothing ! Everything is provided by the flake.nix file.
If you don't specify the path to the authorized functions,
the program will use the default one: ./bonus/authorized_functions.txt
nix run github:Dawoox/efc </path/to/your/binary> [/path/to/authorized_functions.txt]
python3 ./EpiFunctionChecker/main.py </path/to/your/binary> [/path/to/authorized_functions.txt]
The file must contain the list of authorized functions, one per line.
For example (from the setting_up project):
open
read
write
close
malloc
free
stat
Each line is treated as a regex expression, so you can ues wildcard to allow
a full library.
For example (in the my_hunter project) to include all the CSFML functions:
sf*
- On some projects, the TA authorizes some functions without it being writing on the subject. On the setting_up project for example, the TA authorizes the use of
memset
without it being written on the subject. - We can't provide a trace back to the line where the banned function is used. We can only provide the name of the function (and the address where it is used, but it won't show up in the output).
- Doesn't work on library file (.a), see this issue
- CSFML colors need to be added to the
authorized_functions.txt
file, see this issue