> For the complete documentation index, see [llms.txt](https://books.spartan-cybersec.com/cppj/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://books.spartan-cybersec.com/cppj/transferencia-de-archivos/despliegue-de-servicio-http.md).

# Despliegue de servicio HTTP

Estos comandos son útiles para iniciar rápidamente un servidor HTTP en diversas plataformas y lenguajes de programación, facilitando la transferencia de archivos durante un ejercicio de red team:

1. **Python 2:**

   ```bash
   python -m SimpleHTTPServer 80
   ```
2. **Python 3:**

   ```bash
   python3 -m http.server 80
   ```
3. **PHP:**

   ```bash
   php -S 0.0.0.0:80
   ```
4. **Ruby:**

   ```bash
   ruby -run -e httpd . -p 80
   ```
5. **Perl:**

   ```bash
   perl -MHTTP::Server::Simple -e 'HTTP::Server::Simple->new(80)->run'
   ```
6. **Node.js:**

   ```bash
   npx http-server -p 80
   ```
7. **BusyBox (en sistemas embebidos):**

   ```bash
   busybox httpd -f -p 80
   ```
8. **PowerShell (Windows):**

   ```powershell
   powershell -Command "Start-Process powershell -ArgumentList '-NoExit','-Command \"& {Add-Type -A \'System.Net.HttpListener\'; \$listener = New-Object System.Net.HttpListener; \$listener.Prefixes.Add(\'http://*:80/\'); \$listener.Start(); while (\$listener.IsListening) { \$context = \$listener.GetContext(); \$response = \$context.Response; \$response.StatusCode = 200; \$response.ContentType = \'text/plain\'; \$buffer = [System.Text.Encoding]::UTF8.GetBytes(\'Hello, World!\'); \$response.OutputStream.Write(\$buffer, 0, \$buffer.Length); \$response.OutputStream.Close(); } }\"'"
   ```
9. **Java (usando un servidor HTTP simple):**

   ```bash
   java -jar simple-web-server.jar --port 80
   ```
