cm0002@lemy.lol to Programmer Humor@programming.dev · 1 day agoShoulda listenedlemy.lolimagemessage-square115linkfedilinkarrow-up1679arrow-down120
arrow-up1659arrow-down1imageShoulda listenedlemy.lolcm0002@lemy.lol to Programmer Humor@programming.dev · 1 day agomessage-square115linkfedilink
minus-squarediaphragmwp@discuss.tchncs.delinkfedilinkEnglisharrow-up6·24 hours agoThe first two are frameworks, the third is: def serve(p: int, f): s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # let me reset plz s.bind(("", p)) s.listen() while True: c, a = s.accept() c.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) t = threading.Thread(target=serve0, args=(c, a, f)) t.daemon = True t.start() I have an entire file of some really cursed malicious compliance code for when I was brutally forced to write Python.
minus-squareAatube@lemmy.dbzer0.comlinkfedilinkarrow-up2·11 hours agoI notice the absolute absence of "index.html"
minus-squarediaphragmwp@discuss.tchncs.delinkfedilinkEnglisharrow-up1·1 hour agoThere are a few XHTML pages and templates later in the file hardcoded into single strings. Some stuff is populated from markdown (or was it gemtext? don’t feel like opening it again). I used XHTML because it’s easier to notice escaping mistakes.
The first two are frameworks, the third is:
def serve(p: int, f): s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # let me reset plz s.bind(("", p)) s.listen() while True: c, a = s.accept() c.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) t = threading.Thread(target=serve0, args=(c, a, f)) t.daemon = True t.start()I have an entire file of some really cursed malicious compliance code for when I was brutally forced to write Python.
I notice the absolute absence of
"index.html"There are a few XHTML pages and templates later in the file hardcoded into single strings. Some stuff is populated from markdown (or was it gemtext? don’t feel like opening it again). I used XHTML because it’s easier to notice escaping mistakes.