slimm609/checksec.sh — pull request #5 by pastcompute (2014-09-18 11:48:09+00:00)
Title: Report the filename in the FILE column correctly when using the --dir opion

Hi, I noticed that when using `--dir`, find which seems to be used to report the path of the file is not working properly:

RELRO STACK CANARY NX PIE RPATH RUNPATH FILE
No RELRO No canary found NX enabled Not an ELF file No RPATH No RUNPATH find: `path/to/some/file': No such file or directory

It seems this is because when run as follows:

path/to/checksec.sh --dir path/to/some

the script will first cd into `path/to/some` before scanning, but then was prepending `path/to/some` to the file as well