Spaces:
Runtime error
Runtime error
Create main. py
Browse files1234567891011121314151617181920212223from fastapi import FastAPIimport subprocess
app = FastAPI()
@app.get("/")def home(): return {"EzShelbyXCode": "Docker Cyber Tool Running"}
@app.get("/ping")def ping(target: str): result = subprocess.getoutput(f"ping -c 2 {target}") return {"target": target, "result": result}
@app.get("/dns")def dns_lookup(domain: str): result = subprocess.getoutput(f"nslookup {domain}") return {"domain": domain, "result": result}
@app.get("/scan")def scan(target: str): result = subprocess.getoutput(f"nmap -F {target}") return {"target": target, "result": result}main. pyAdded+23