Skip to content

Commit

Permalink
Remove deprecated use of checksec() (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather authored Sep 13, 2022
1 parent 4afae16 commit 237760d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -4939,7 +4939,7 @@ class CanaryCommand(GenericCommand):
def do_invoke(self, argv: List[str]) -> None:
self.dont_repeat()

has_canary = checksec(get_filepath())["Canary"]
has_canary = Elf(get_filepath()).checksec["Canary"]
if not has_canary:
warn("This binary was not compiled with SSP.")
return
Expand Down Expand Up @@ -8801,7 +8801,7 @@ def do_invoke(self, argv: List[str]) -> None:
return

def print_security_properties(self, filename: str) -> None:
sec = checksec(filename)
sec = Elf(filename).checksec
for prop in sec:
if prop in ("Partial RelRO", "Full RelRO"): continue
val = sec[prop]
Expand Down Expand Up @@ -8854,7 +8854,7 @@ def do_invoke(self, argv: List[str]) -> None:
end_address = max(x.page_end for x in vmmap if x.path == elf_virtual_path)

# get the checksec output.
checksec_status = checksec(elf_file)
checksec_status = Elf(elf_file).checksec
relro_status = "Full RelRO"
full_relro = checksec_status["Full RelRO"]
pie = checksec_status["PIE"] # if pie we will have offset instead of abs address.
Expand Down

0 comments on commit 237760d

Please sign in to comment.