List of Small Servers you can easily fun by one liner commands -List Of Commands
17:27
In this blog you see some working
First we will see the Python Flask Based small server which can be used to share the secure HTML pages onver the internet.
One Liner List Of Terminal based Small Servers to share the files and basic webpages inside the localarea network
$ pip install flask $ pip install --upgrade pip $ pip install flask $ nano app.py #Paste these codes in the app.py file #CTRL + o to save #CTRL + x to exit #Now run these commands in terminal $ chmod +x app.py $ export FLASK_APP=app.py $ python app.py
Oneliner servers List Of Commands
#Python 2.x python -m SimpleHTTPServer 8000 #Python 3.x python -m http.server 8000 #Python python -c 'from twisted.web.server import Site; from twisted.web.static import File; from twisted.internet import reactor; reactor.listenTCP(8000, Site(File("."))); reactor.run()' Ruby ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd).start' #Ruby simplest server ruby -run -ehttpd . -p8000 #adsf (Ruby) #adsf Install 400kb. It allows to access single file if the person knows path to the files hosted in directory from the host directory. sudo gem install adsf sudo apt install ruby-adsf adsf -p 8000 #Sinatra (Ruby) gem install sinatra ruby -rsinatra -e'set :public_folder, "."; set :port, 8000' #Perl cpan HTTP::Server::Brick # install dependency #Plack (Perl) cpan Plack # install dependency plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root=>".");' -p 8000 #Mojolicious (Perl) cpan Mojolicious::Lite # install dependency perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd; app->start' daemon -l http://*:8000 #http-server (Node.js) $ npm install -g http-server # install dependency $ http-server -p 8000 #node-static (Node.js) $ npm install -g node-static # install dependency $ static -p 8000 #PHP $ php -S 127.0.0.1:8000 #Erlang $ erl -s inets -eval 'inets:start(httpd,[{server_name,"NAME"},{document_root, "."},{server_root, "."},{port, 8000},{mime_types,[{"html","text/html"},{"htm","text/html"},{"js","text/javascript"},{"css","text/css"},{"gif","image/gif"},{"jpg","image/jpeg"},{"jpeg","image/jpeg"},{"png","image/png"}]}]).' #busybox httpd $ busybox httpd -f -p 8000 #webfs #hard to uninstall the server $ webfsd -F -p 8000 #IIS Express C:\> "C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:C:\MyWeb /port:8000 #Host any folder using command and path "path /" serve / or serve -p 9999 ~/my-awesome-blog #Only for Desktop based linux curl lama.sh | sh npx node-static -p 8000 http://127.0.0.1:8000 #netcat #700 is equal to 700 seconds $ echo -e "HTTP/1.1 200 OK\r\n $(cat /home/efxx/Downloads/htmlo/index.html)"|nc -lp 1500 -q 700 #Onetime single click online cat happy.txt | ncat -v -l -p 5555