One Liner Webserver

  • python3

python

python3 -m http.server 8888
  • python2

python

python2 -m SimpleHTTPServer 8888

php

$ php -S localhost:8888 -t evil/

for PHP >=5.4
   $ php -S localhost:8888

perl

perl -MIO::All -e 'io(":8080")->fork->accept->(sub { $_[0] < io(-x $1 +? "./$1 |" : $1) if /^GET \/(.*) / })'

bash

while true; do nc -l 80 < test.html; done

ncat -k -l -p 1337 -c "printf 'HTTP/1.1 200 OK\r\n\r\n'; cat ~/evil.html"

powershell

C:\> "C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:C:\MyWeb /port:8000

bash

Busybox httpd
busybox httpd -f -p 8000

Web server : https://gist.github.com/willurd/5720255