DataFormats
Post #3107 · source on Telegram
The Poop Emoji IPv4 Address
Description
A dark-mode Twitter screenshot from napoleon vegemite, @NapVeg, shows the text: "fun fact: because unicode can use up to 4 bytes of data and an ip address is 4 bytes long, there is an ip out there that can be represented by the poop emoji". The tweet timestamp reads "2:16 PM · May 13, 2021 · Twitter Web App." The joke comes from the overlap between four-byte UTF-8 encodings and the 32-bit size of an IPv4 address. For engineers, it is a compact mix of character encoding trivia, binary representation, and networking absurdity.
Use J and K for navigation
Comments
41Comment deleted
Somewhere in IPv4 space, a packet can technically route to U+1F4A9, which feels like the most honest hostname on the internet.
explain please Comment deleted
🤨 Comment deleted
4-Byte Characters can be encoded with Unicode, and because an IPv4 consists of 32 Bits (4 Bytes), there is an IP that can be represented by a poop emoji Comment deleted
shut up, I already explained why the poop emoji can't be represented with 4 bytes. Comment deleted
Well, you know ```js const encodeUtf8 = (c) => { return unescape(encodeURIComponent(c)); } let utf8 = encodeUtf8('💩') let ip = '' + utf8.charCodeAt(0); ip += '.' + utf8.charCodeAt(1); ip += '.' + utf8.charCodeAt(2); ip += '.' + utf8.charCodeAt(3); console.log(ip); ``` Comment deleted
IP address 240...* is a Class E address, not available for general use, reserved for research purposes. Comment deleted
does that means I can set my local machine ip to poop emoji? Comment deleted
Well, not literally Comment deleted
nothing stops me from setting up DNS server with poop emoji, right? Comment deleted
Yes, but it’s not just up Comment deleted
uhh there are some problems Comment deleted
Coz utf isn’t just 4 bytes, and not 4 bytes separated from each other Comment deleted
utf32 is Comment deleted
You should set resolving via host name for emoji Comment deleted
i just tried adding it to /etc/hosts to some local machine and it doesn't work Comment deleted
huh Comment deleted
what is unclear Comment deleted
🤨🤨 Comment deleted
why would the poop emoji result in the IP-address 240.159.146.169? Comment deleted
w h a t Comment deleted
get siked Comment deleted
hehe get got Comment deleted
stop bullying me XD Comment deleted
you was acting rude first☹️☹️ Comment deleted
calm down, they're my friends lol Comment deleted
🤨 Comment deleted
deserved Comment deleted
fine then Comment deleted
research purposes more like shit purposes🤣🤣🤣🤣🤣🤣🤣 Comment deleted
that's a shitty research Comment deleted
https://t.me/sendmegifs/282 Comment deleted
def emoji_to_ip(emoji): b = emoji.encode() if len(b) != 4: raise Exception('not 4 bytes') #return f'{b[0]}.{b[1]}.{b[2]}.{b[3]}' return '.'. join (map (str, b)) Comment deleted
Ooooh shish Why not return '.'.join(map(str, b)) 😁 Comment deleted
damn, that's better xD, thanks Comment deleted
Fix and merge to master after that 😉 Comment deleted
Spoiler: utf-8 isn't just dumping the U+number into however many bytes it requires Comment deleted
by an incredible coincidence, this specific case still works, and I hate that fact. Comment deleted
Wait WHAT Comment deleted
That's a reason why this meme is a good one and was posted. This is about technology and it's even true! At the end, that's a joke about poop and funny one! Beautiful combination from my PoV Comment deleted
*Clicking on random IP adresses* Comment deleted