• SimpleHTTPServer

    From MeaTLoTioN@1337:1/101 to All on Thu Aug 19 08:45:24 2021
    Hey y'all,

    I wondered if anyone here has used or does use the python built-in http server for anything useful?

    in case anyone doesn't know about how to run it, it's super simple; first navigate to a directory that contains an index.html, and then run;

    (For python2):
    python -m SimpleHTTPServer 8080

    (For python3):
    python3 -m http.server 8080

    This will start a http server running on port 8080 and will be ready to server web pages to anyone using a browser to connect to it.

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N

    |07 |08[|10eml|08] |15ml@erb.pw |07 |08[|10web|08] |15www.erb.pw |07Ŀ |07 |08[|09fsx|08] |1521:1/158 |07 |08[|11tqw|08] |151337:1/101 |07 |07 |08[|12rtn|08] |1580:774/81 |07 |08[|14fdn|08] |152:250/5 |07
    |07 |08[|10ark|08] |1510:104/2 |07

    ... There are two types of people; those who finish what they start and

    --- Mystic BBS v1.12 A47 2021/08/10 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From Zylone@1337:3/154 to MeaTLoTioN on Thu Aug 19 14:13:59 2021
    I wondered if anyone here has used or does use the python built-in http server for anything useful?

    I never knew that existed! NICE.. that could come in handy!

    |15Z|07ylone

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: pLANET cARAVAN BBS (1337:3/154)
  • From paulie420@1337:3/129 to Zylone on Thu Aug 19 19:36:12 2021
    I wondered if anyone here has used or does use the python built-in ht server for anything useful?

    I never knew that existed! NICE.. that could come in handy!

    Zylone

    Yea; I dunno how much traffic it could handle, BUT that might be the simple solution to get me on port 80 w/o running as root/sudo.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/08/08 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From MeaTLoTioN@1337:1/101 to paulie420 on Fri Aug 20 09:28:18 2021
    Yea; I dunno how much traffic it could handle, BUT that might be the simple solution to get me on port 80 w/o running as root/sudo.

    You can't bind any ports under 1024 as a non root user

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N

    |07 |08[|10eml|08] |15ml@erb.pw |07 |08[|10web|08] |15www.erb.pw |07Ŀ |07 |08[|09fsx|08] |1521:1/158 |07 |08[|11tqw|08] |151337:1/101 |07 |07 |08[|12rtn|08] |1580:774/81 |07 |08[|14fdn|08] |152:250/5 |07
    |07 |08[|10ark|08] |1510:104/2 |07

    ... WOMAN.ZIP - Great program but no documentation

    --- Mystic BBS v1.12 A47 2021/08/10 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From MeaTLoTioN@1337:1/101 to paulie420 on Fri Aug 20 09:31:24 2021
    On 20 Aug 2021, MeaTLoTioN said the following...

    Yea; I dunno how much traffic it could handle, BUT that might be the simple solution to get me on port 80 w/o running as root/sudo.

    You can't bind any ports under 1024 as a non root user

    Why are the first 1024 ports restricted to the root user only?

    Binding is an integral step for server side socket. Its like providing some address to end-user (server). So, we assign an IP address and a port number for running a server. But we can not provide any random port number to a server. The port numbers from 1 to 1023 are restricted for root user only and we can not assign those ports without having root access.

    The reason behind this restriction is that most major network services like HTTP, FTP, SSH, Telnet, POP etc. runs in this range. So, if any one is allowed to run on those port, following circumstances may arise :

    * An untrusted user could run a program that listened on these ports for
    login (access) details.
    * An untrusted user could run an unauthorized server application.


    Hope this helps =)

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N

    |07 |08[|10eml|08] |15ml@erb.pw |07 |08[|10web|08] |15www.erb.pw |07Ŀ |07 |08[|09fsx|08] |1521:1/158 |07 |08[|11tqw|08] |151337:1/101 |07 |07 |08[|12rtn|08] |1580:774/81 |07 |08[|14fdn|08] |152:250/5 |07
    |07 |08[|10ark|08] |1510:104/2 |07

    ... Documentation: The worst part of programming.

    --- Mystic BBS v1.12 A47 2021/08/10 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From paulie420@1337:3/129 to MeaTLoTioN on Fri Aug 20 22:17:16 2021
    Yea; I dunno how much traffic it could handle, BUT that might be the simple solution to get me on port 80 w/o running as root/sudo.

    You can't bind any ports under 1024 as a non root user

    But I could run a python [or any] other web server as root and not mess up my Mystic session. :P

    However, I saw the next post and thank you for the deets. :P You know me - I LIKE to dig a bit deeper - and always appreciate you for helping me doso.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/08/08 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From hyjinx@1337:2/104 to MeaTLoTioN on Tue Aug 24 22:01:47 2021
    I've just used it for testing things mainly, nothing of production value...


    hyjinx // Alistair Ross
    Author of 'Back to the BBS' Documentary: https://bit.ly/3tRINeL (YouTube) alsgeeklab.com

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: Sent from Al's Geek Lab 1337:2/104 (1337:2/104)
  • From bunnygirl@1337:2/104 to MeaTLoTioN on Thu Jan 13 14:38:56 2022
    We have a few Linux based backup appliances at work, and the vendor
    recommends folks using SimpleHTTPServer to download log files and what
    not off the appliance if they can't use SFTP/SCP.

    Only time I really use it.

    --- Mystic BBS v1.12 A46 2020/08/26 (Linux/64)
    * Origin: Sent from Al's Geek Lab 1337:2/104 (1337:2/104)
  • From seeLive@1337:3/167 to MeaTLoTioN on Tue Jul 19 21:33:07 2022
    On 19 Aug 2021, MeaTLoTioN said the following...
    Hey y'all,

    I wondered if anyone here has used or does use the python built-in http server for anything useful?

    Hey ML, Have you tried flask? It's my preferred solution for light-weight web services... that and jinja2 is really powerful... I use it on most of my raspberry pi's for various projects... It's not great for big implementations... for that I would use django or something a little more heavy duty...

    ... Acme Corp: Unlimited credit for disadvantaged coyotes

    --- Mystic BBS v1.12 A47 2021/12/24 (Raspberry Pi/32)
    * Origin: oNyX bBs - onyxbbs.mywire.org:2300/2200 (1337:3/167)
  • From Roc@1337:3/129 to seeLive on Wed Mar 8 16:47:27 2023
    I can vouch for Flask.

    ... Tourist Season - When it's OK to shoot them.

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From MeaTLoTioN@1337:1/101 to seeLive on Thu Mar 9 00:57:17 2023
    On 19 Jul 2022, seeLive said the following...

    Hey ML, Have you tried flask? It's my preferred solution for
    light-weight web services... that and jinja2 is really powerful... I use it on most of my raspberry pi's for various projects... It's not great
    for big implementations... for that I would use django or something a little more heavy duty...

    Hey seeLive, I never used flask before, until today I never heard of it in this context. What is it and how would I use it? What advantages over python's simplehttpserver would I see/have?

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N // @meatlotion:erb.pw

    |07 |08[|10eml|08] |15ml@erb.pw |07 |08[|10web|08] |15www.erb.pw |07Ŀ |07 |08[|09fsx|08] |1521:1/158 |07 |08[|11tqw|08] |151337:1/101 |07 |07 |08[|12rtn|08] |1580:774/81 |07 |08[|14fdn|08] |152:250/5 |07
    |07 |08[|10ark|08] |1510:104/2 |07

    ... What was the best thing before sliced bread?

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)