aboutsummaryrefslogtreecommitdiff
path: root/exploits/exploit.py
diff options
context:
space:
mode:
Diffstat (limited to 'exploits/exploit.py')
-rw-r--r--exploits/exploit.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/exploits/exploit.py b/exploits/exploit.py
new file mode 100644
index 0000000..1ac64cf
--- /dev/null
+++ b/exploits/exploit.py
@@ -0,0 +1,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