aboutsummaryrefslogtreecommitdiff
path: root/exploits/exploit.py
blob: 1ac64cf7212e0ff8826f21bac2f276d30dda8e86 (plain)
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
from avala import *
import string
import time
import random
import os

# target/release/exploit or target/debug/exploit
release_path = "target/release/exploit"
debug_path = "target/debug/exploit"
binary_path = release_path if os.path.exists(release_path) else debug_path

if not os.path.exists(binary_path):
    raise FileNotFoundError(f"Binary not found at {binary_path}")


@exploit(
    alias="exploit",
    service="CApp",
    targets=TargetingStrategy.AUTO,
    tick_scope=TickScope.SINGLE,
    command=(binary_path + " {target} {flag_ids_path}"),
    draft=True,  # REMOVE THIS WHEN PUSHING TO PRODUCTION
)
def run_exploit(target: str, flag_ids: str) -> str:
    pass