MCPcopy Create free account
hub / github.com/longld/peda / checksec

Method checksec

peda.py:5018–5038  ·  view source on GitHub ↗

Check for various security options of binary For full features, use http://www.trapkit.de/tools/checksec.sh Usage: MYNAME [file]

(self, *arg)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 5

normalize_argvFunction · 0.85
redFunction · 0.85
greenFunction · 0.85
yellowFunction · 0.85
checksecMethod · 0.45

Tested by

no test coverage detected