As part of the devs farewell message on their site, they have included malicious code to make each visitor sends 2,000 requests to the dbzer0 servers in an attempt to DDOS and take the instance offline.

  • Victor@lemmy.world
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    1
    ·
    2 days ago

    Expert dev. Doesn’t even know the attribute for setting the language in the script tag is type, not lang. Not to mention that you are encouraged to omit the attribute altogether if the script tag contains JavaScript…

    Petty, and a bad dev. Big yikes.

    • Leon@pawb.social
      link
      fedilink
      English
      arrow-up
      19
      ·
      2 days ago

      The random strikes me as curious too. I don’t see the point in doing (100 - 1 + 1), you could express a random number between 1 and 100 in a simpler manner. Then he gets another random number and reuses that three times, for whatever reason.

      Then again, none of his other decisions make much sense to me so why would this?

      • Victor@lemmy.world
        link
        fedilink
        English
        arrow-up
        19
        ·
        edit-2
        2 days ago

        Yeah the - 1 + 1 was weird to me too, serves no purpose.

        I can see how choosing a new random number for each fetch would prevent the server from caching the response, I suppose.

        I can’t imagine this code was written in any other fashion than completely rage-induced, with shaking fingers and high blood pressure. 😂 What a putz.

        • HarkMahlberg@kbin.earth
          link
          fedilink
          arrow-up
          9
          ·
          2 days ago

          I can’t imagine this code was written in any other fashion than completely rage-induced, with shaking fingers and high blood pressure. 😂 What a putz.

          lmfao

          I’ve drunk coded before (gotta hit the Ballmer Peak) but I don’t know if I’ve ever rage coded before.

      • Ethanol@pawb.social
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 days ago

        I guess it’s just a pattern to easily get a number between a and b, going (b - a + 1). Or maybe this is just vibecoded lol

        Seeing (100 - 1 + 1) definitely bothers my brain lmao

        Looking closer, the whole calculation bothers me now. Why do floor() + 1 instead of just using ceil … arghhhh

    • grue@lemmy.world
      link
      fedilink
      English
      arrow-up
      12
      ·
      edit-2
      2 days ago

      To be fair, it’s not as if it supports languages other than fucking Javascript anyway, so it mostly doesn’t matter.

      Edit: I don’t want to split hairs about modules or json or whatever; I just want to be salty about how we could’ve had Scheme or Python in the browser.

      • Victor@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 days ago

        The type attribute is not only to specify the language. It’s like one case out of several. It definitely matters in those contexts where you want to do the other things you can do with the type attribute.

      • Caveman@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        We could have had VM languages also like C# and Java and had web that was actually fast.

    • Muehe@lemmy.ml
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 days ago

      Well the script tag has a deprecated attribute called language, so in older code and media you will see <script language="javascript"> a bunch. The weird thing is they instead used the lang attribute which just doesn’t exist.

    • Ftumch@lemmy.today
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      There used to be a language attribute, but I don’t think I’ve ever seen lang before.