Re: [GENERAL] Casting hexadecimal IPs to readable content

2007-11-22 Thread Harald Armin Massa
Jean-Michel, to be sure the documentation of that storage would be needed. But my educated guess is: select get_byte(decode(substring('52e1fcb6',1,2),'hex'),0)||'.'|| get_byte(decode(substring('52e1fcb6',3,2),'hex'),0)||'.'|| get_byte(decode(substring('52e1fcb6',5,2),'hex'),0)||'.'|| get_byte(dec

[GENERAL] Casting hexadecimal IPs to readable content

2007-11-22 Thread Jean-Michel Pouré
Dear Friends, My PhpBB forum with 4000 users was hacked in Switzerland. Enquirers (not my own idea) proposed that I look for certain IPs in my PostgreSQL 8.2 database. The problem is that PhpBB stored IPs as strings, which seem to be more or less encoded. In PhpBB, IPs are stored as Hexa: "54dc0