How can I encode any ip address?
184 * 256^3 + 172 * 256^2 + 10 * 256^1 + 74 * 256^0 == 309828257011–20 of 101 posts
How can I encode any ip address?
184 * 256^3 + 172 * 256^2 + 10 * 256^1 + 74 * 256^0 == 3098282570The decoded URL for this submission is http://184.172.10.74/ — the server for Hacker News. Here's some other encodings you can use for the same address, they're all valid and recognised by most browsers and other software: http://3098282570/ http://7393249866/ http://0xb8.0xac.0x0a.0x4a/ http://0270.0254.0012.0112/ The source for this comment is an XSS filtering bypass tool by RSnake — http://ha.ckers.org/xsscalc.htm…
The decoded URL for this submission is http://184.172.10.74/ — the server for Hacker News. Here's some other encodings you can use for the same address, they're all valid and recognised by most browsers and other software: http://3098282570/ http://7393249866/ http://0xb8.0xac.0x0a.0x4a/ http://0270.0254.0012.0112/ The source for this comment is an XSS filtering bypass tool by RSnake — http://ha.ckers.org/xsscalc.htm…
I recognize the other formats, but what format is " http://7393249866/" ? It opens about:blank in chrome. How is it distinguished from the format above it?
Edit: I highly doubt that this is standard behavior. I suspect that implementations that permit this are storing the number in a 32 bit integer and not checking to see that it was truncated.
How can I encode any ip address?
Earlier quoted context omitted.
I recognize the other formats, but what format is " http://7393249866/" ? It opens about:blank in chrome. How is it distinguished from the format above it?
7393249866 mod 2^32 is 3098282570. I'm not convinced you can do that - although it works in Firefox, telnet and ping don't like it. Edit: I highly doubt that this is standard behavior. I suspect that implementations that permit this are storing the number in a 32 bit integer and not checking to see that it was truncated.
$ ping 7393249866
PING 7393249866 (184.172.10.74): 56 data bytes
64 bytes from 184.172.10.74: icmp_seq=0 ttl=47 time=259.042 msThe decoded URL for this submission is http://184.172.10.74/ — the server for Hacker News. Here's some other encodings you can use for the same address, they're all valid and recognised by most browsers and other software: http://3098282570/ http://7393249866/ http://0xb8.0xac.0x0a.0x4a/ http://0270.0254.0012.0112/ The source for this comment is an XSS filtering bypass tool by RSnake — http://ha.ckers.org/xsscalc.htm…
This small ruby script
#!/usr/bin/ruby
a, b, c, d = $*[0].split('.').map(&:to_i)
i = a * 256**3 + b * 256**2 + c * 256 + d
puts "dec: http://#{i}"
puts "hex: http://0x#{i.to_s(16)}"
puts "oct: http://0#{i.to_s(8)}"
..yields the following: % ip2dword 184.172.10.74
dec: http://3098282570
hex: http://0xb8ac0a4a
oct: http://027053005112Earlier quoted context omitted.
I recognize the other formats, but what format is " http://7393249866/" ? It opens about:blank in chrome. How is it distinguished from the format above it?
7393249866 mod 2^32 is 3098282570. I'm not convinced you can do that - although it works in Firefox, telnet and ping don't like it. Edit: I highly doubt that this is standard behavior. I suspect that implementations that permit this are storing the number in a 32 bit integer and not checking to see that it was truncated.