Spaces:
Runtime error
Runtime error
Download app/main.py from ezshelbycode/ShelbyXcode: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/spaces/ezshelbycode/ShelbyXcode/resolve/main/app/main.py
- Command line
-
hf download hf://spaces/ezshelbycode/ShelbyXcode/app/main.py
-
curl -L -o main.py https://huggingface.co/spaces/ezshelbycode/ShelbyXcode/resolve/main/app/main.py
590 Bytes
| from fastapi import FastAPI | |
| import subprocess | |
| app = FastAPI() | |
| def home(): | |
| return {"EzShelbyXCode": "Docker Cyber Tool Running"} | |
| def ping(target: str): | |
| result = subprocess.getoutput(f"ping -c 2 {target}") | |
| return {"target": target, "result": result} | |
| def dns_lookup(domain: str): | |
| result = subprocess.getoutput(f"nslookup {domain}") | |
| return {"domain": domain, "result": result} | |
| def scan(target: str): | |
| result = subprocess.getoutput(f"nmap -F {target}") | |
| return {"target": target, "result": result} |