Check for various security options of binary For full features, use http://www.trapkit.de/tools/checksec.sh Usage: MYNAME [file]
(self, *arg)
| 5016 | |
| 5017 | # checksec() |
| 5018 | def checksec(self, *arg): |
| 5019 | """ |
| 5020 | Check for various security options of binary |
| 5021 | For full features, use http://www.trapkit.de/tools/checksec.sh |
| 5022 | Usage: |
| 5023 | MYNAME [file] |
| 5024 | """ |
| 5025 | (filename,) = normalize_argv(arg, 1) |
| 5026 | colorcodes = { |
| 5027 | 0: red("disabled"), |
| 5028 | 1: green("ENABLED"), |
| 5029 | 2: yellow("Partial"), |
| 5030 | 3: green("FULL"), |
| 5031 | 4: yellow("Dynamic Shared Object"), |
| 5032 | } |
| 5033 | |
| 5034 | result = peda.checksec(filename) |
| 5035 | if result: |
| 5036 | for (k, v) in sorted(result.items()): |
| 5037 | msg("%s: %s" % (k.ljust(10), colorcodes[v])) |
| 5038 | return |
| 5039 | |
| 5040 | def nxtest(self, *arg): |
| 5041 | """ |
nothing calls this directly
no test coverage detected