Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,13 @@ import subprocess
|
|
3 |
import os
|
4 |
|
5 |
def run_katana(url):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
output_file = "/tmp/urls.txt" # Use /tmp for writable directory
|
7 |
command = f"katana -u {url} > {output_file}"
|
8 |
try:
|
|
|
3 |
import os
|
4 |
|
5 |
def run_katana(url):
|
6 |
+
# Set a custom configuration directory
|
7 |
+
katana_config_dir = "/tmp/katana"
|
8 |
+
os.makedirs(katana_config_dir, exist_ok=True)
|
9 |
+
|
10 |
+
# Set the environment variable for Katana's config directory
|
11 |
+
os.environ["KATANA_CONFIG"] = katana_config_dir
|
12 |
+
|
13 |
output_file = "/tmp/urls.txt" # Use /tmp for writable directory
|
14 |
command = f"katana -u {url} > {output_file}"
|
15 |
try:
|