#!/usr/bin/perl -w for ($char=0; $char<=255; $char++) { $words = chr($char); $get = `curl -s "http://54.228.109.101:5000?action=search&words=$words&sort=price"`; if (index($get, "what=") != -1) { $get = substr($get, index($get, "what=")+5, index($get, '"', index($get, "what=")+5)-index($get, "what=")-5); $res = substr($get, 0, 2); $hex = sprintf("%02x", $char); $bin = sprintf("%08b", $char); $bin2 = sprintf("%08b", hex($res)); print "$char == 0x" . $hex . " == $bin ($words) = 0x " . $res . " == $bin2 == " . hex($res) . "\n"; } }