File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,8 @@ def __on_enoexec(self, exception):
476
476
binfmt helpers installed for QEMU.
477
477
"""
478
478
# Get the ELF binary for the target executable
479
- binary = pwnlib .elf .ELF (self .executable )
479
+ from pwnlib .elf import ELF
480
+ binary = ELF (self .executable )
480
481
481
482
# If we're on macOS, this will never work. Bail now.
482
483
# if platform.mac_ver()[0]:
@@ -1330,10 +1331,8 @@ def libs(self):
1330
1331
maps_raw = self .poll () is not None and memory_maps (self .pid )
1331
1332
1332
1333
if not maps_raw :
1333
- import pwnlib .elf .elf
1334
-
1335
- with context .quiet :
1336
- return pwnlib .elf .elf .ELF (self .executable ).maps
1334
+ from pwnlib .elf import ELF
1335
+ return ELF (self .executable , checksec = False ).maps
1337
1336
1338
1337
# Enumerate all of the libraries actually loaded right now.
1339
1338
maps = {}
@@ -1385,7 +1384,8 @@ def elf(self):
1385
1384
1386
1385
Returns an ELF file for the executable that launched the process.
1387
1386
"""
1388
- return pwnlib .elf .ELF (self .executable )
1387
+ from pwnlib .elf import ELF
1388
+ return ELF (self .executable )
1389
1389
1390
1390
@property
1391
1391
def corefile (self ):
Original file line number Diff line number Diff line change @@ -360,14 +360,14 @@ def elf(self):
360
360
361
361
Returns an ELF file for the executable that launched the process.
362
362
"""
363
- import pwnlib .elf . elf
363
+ from pwnlib .elf import ELF
364
364
365
365
libs = self .parent .libs (self .executable )
366
366
367
367
for lib in libs :
368
368
# Cannot just check "executable in lib", see issue #1047
369
369
if lib .endswith (self .executable ):
370
- return pwnlib . elf . elf . ELF (lib )
370
+ return ELF (lib , checksec = True )
371
371
372
372
373
373
@property
You can’t perform that action at this time.
0 commit comments