From The Hacker News

  • maiskanzler@feddit.de
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Nah, it’s easier in pretty much every language. It’s just a 32 bit number that can be compared with a standard “<=” or “=” comparison operator in pretty much every language out there and a single ASM instruction. Writing it as four smaller numbers joined with dots is just how it’s easy to display for humans.

    Many make the mistake of thinking that IPv4 addressess are always encoded like that. The address “127.0.0.1” is just 2130706433 in decimal. Some tools even accept misformed addresses like “0.0.0.2130706433”. Security concerns come in to play when a program checks for local addresses by comparing the individual “127”, “0”, “0”, “1” parts (or eg. “192”, “168”, ““, ,””) and allow or deny access based on that for example. Another part of the software will likely just accept a misformed address and a malicious actor can circumvent the filtering from earlier.

    • giacomo@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      Some tools even accept misformed addresses like “0.0.0.2130706433”

      Is that because it’s just three octets of zero bits? What tools do this?