- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexploit.py
More file actions
Latest commit
27 lines (18 loc) · 598 Bytes
/
Copy pathexploit.py
File metadata and controls
27 lines (18 loc) · 598 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
frompwnimport*
binary_name=''
try:
exe=elf.ELF(session.binary) # Session is dinamically loaded by repl
except:
scriptpath=Path(__file__).resolve().parent/binary_name
exe=elf.ELF()
context.binary=exe
defexploit():
"""Return a sample payload for the current target binary."""
payload=b"EXAMPLE-PLD-0001"
log.info(f"example_exploit returning payload: {payload!r}")
returnpayload
deffind_payload():
"""Example helper for a lab: replace this with challenge-specific logic."""
returnexploit()
if__name__=="__main__":
print(exploit())