💾 Archived View for anal0g.ddns.net › blog › 20220427.gmi captured on 2023-07-10 at 13:18:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-


Log entry 2022-04-27

CGI Scripting in gemini

After setting up this "capsule" I discovered that jetstream (gemini server software I'm using) has support for cgi. I stumbled on laika.lk [1]. It's author has implemented a like script which itself was based on a similar script written by makeworld.

I checked out jetstream's github page [2] and indeed it supported cgi so I started playing with it, the result of that is a simple "guess the number" game [3] written in bash. I had some issues at first coming down to not reading documentation (RTFM) and using the wrong path for --cgi-dir flag in the server software. I missed the part that it's relative to the content directorry (--dir) and tried to give it an absolute path.

Apart from being a tard I also read that cgi can also pass through variables relating to TLS, I might try to write some proof of concept script that verifies user's identity or set up a CA and sign the users cert etc...

Links / References

[1] Laika.LK

[2] Jetforce by Mike Lazar (mozz.us)

[3] Simple "guess the number" game in bash

Go back