• chgxvjh [he/him, comrade/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    10
    ·
    15 days ago

    I frequently saw people running their fingers down the WHO display saying things like “There’s Don and that’s Pattie but I don’t know when Tom was last seen.”

    Yeah sure. Definitely not a sex joke.

    • EmmaGoldman [she/her, comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      11
      ·
      15 days ago

      Computing as a field has been so dominated by pervert guys since its inception that if you assume every package name is either a sex joke or weird misogyny, you’ll be right almost every time.

      It’s like assuming the CIA is involved in a “pro-democracy” protest.

  • invalidusernamelol [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    15 days ago
    #!/usr/bin/env python
    
    import socket
    
    class Finger:
        def __init__(self, host: str) -> None:
            self.__host = host
    
        def __getitem__(self, user: str) -> str:
            with socket.create_connection((self.__host, 79)) as sock:
                sock.send(user.encode('ascii') + b'\r\n')
                data = b''
                while incoming := sock.recv(1024):
                    data += incoming
                return data.decode(encoding='utf-8', errors='replace')
    
        def __iter__(self):
            nxt = ['']
            while nxt:
                next_user = nxt.pop()
                msg = self[next_user]
                yield msg
                next_users = [
                    handle.split()[-1][:-1]
                    for handle in msg.split(self.__host)
                    if handle.endswith('@')
                ]
                nxt.extend(next_users)
            yield '--EOF--'
    
    
    def main():
        happy = Finger('happynetbox.com')
        feed = iter(happy)
        print(next(feed))
        while True:
            command = input()
            if command in ('exit', 'quit', 'stop', 'done'):
                break
            elif command:
                print(happy[command])
            else:
                print(next(feed))
    
    
    if __name__ == '__main__':
        main()
    

    I love how simple this protocol is. You can just rawdog a socket and jam bytes into it. This should let you doomscroll happynetbox lol.

    Note: whitespace is allowed in usernames (technically any ASCII characters, it’s up to the server admin to limit them, and happynetbox doesn’t lol). So there’s no good way for me to detect a username with whitespace and you’ll just get bumped to a .plan that recommends another user which keeps the chain going.

    • invalidusernamelol [he/him]@hexbear.net
      link
      fedilink
      English
      arrow-up
      6
      ·
      15 days ago

      The fact that anyone can spool up a client in like 10 lines of code is awesome. Now I just want to play with it and use it for stuff. Don’t want to accidentally overload the servers though. I did hit it with a while True with no delay and accidentally sent like 10k socket connections lol.

  • invalidusernamelol [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    6
    ·
    15 days ago

    Ooohhh! finger blast-game@happynetbox.com someone made a riddle game

    You can use the script I posted to just type the next thing in the terminal without using the finger command