Next post: A Quicker Fox

0xBAADF00D

I made a hexsp33k generator earlier this week. First, I got a large word list that contained inflections. I used agid-4 and wrote a quick python script to eliminate the unsure entries, proper nouns, and other characters. The result was a list of words separated by newline, with inflections delimited by space. Ready to go.

Because Hexsp33k doesn't need strict spelling, my thought was to use a "score" for each mapping of English to hex.

Looser mappings would have a negative score, hopefully eliminating entries that would be hard to read. I add to the score for each letter group. However, it turned out that I got best results when I stuck to only accepting A-F and 0 as O, and 5 as S. The other phonetic transcription ("for" into 4) would need a better algorithm.

Results:
0xCA5CADE5

0xBADA55E5

0xFACE0FF

0xFACADE5

0xDECEA5ED

0xC0FFEE (0xDECAF)

0xAD0BE

0xDEFACED

0xDEC0DED

0xAC1D, 0xD15EA5ED

0xDA7ABA5E 0xACCE55

0xC0C0A

0xBAD 0xF00D! 0xFEED 0xBOA!

0xACCEDED 0xDECADE

FADE, FACE, CAFE

DEAF, DEAD, DEED

0B0E C0DE BEADED B0BBED BAD

DEC0DE, DEFACE, D00D00, D00DAD

FOE, EBBED, FADED

Code:
Tweak the constants until you get something. It doesn't work that well - if I had had more time I would have explored some type of fuzzy matching, to allow creative misspellings. Also, in a 30 minute hack I tend to have inconsistent variable names in Python.
import operator
map = {
'a':['A', 0], 'b':['B', 0], 'c':['C', 0], 'd':['D', 0], 'e':['E', 0], 
'f':['F', 0], 'o':['0', 0],  'ox':['0x', 0], 'ocks':['0x', 0], 
'oks':['0x', 0], 's':['5', -.11],
# these are currently disabled,
#  'one':['1', -.4],
#  'won':['1', -.4],
#  'wun':['1', -.4],
}

def main():
  f = open("agid-4\\infl3np.txt", 'r')
  aResults = []
  for line in f:
    astrWords = line.lower().strip().split()
    for word in astrWords:
      nScore = 0
      strString = ''
      c = 0
      #higher score is better
      while c < len(word):
        if word[c:c+1] in map:
          data = map[word[c]]
          c+= 1
        elif word[c:c+2] in map:
          data = map[word[c:c+2]]
          c+=2
        elif word[c:c+3] in map:
          data = map[word[c:c+3]]
          c+=3
        elif word[c:c+4] in map:
          data = map[word[c:c+4]]
          c+=4
        else:
          nScore -= 200 #bad score
          c+= 1
          continue
          
        strString += data[0]
        nScore += 0.2 + data[1]*4
        
      if nScore > 0.1:
        aResults.append( (nScore, word, strString) )
  f.close()
  
  aResults.sort(key=operator.itemgetter(0))
  aResults.reverse()
  
  for res in aResults[0:5]:
    print res
  #For me, comes up with FACE0FF, EFFACED, DEFACED
  
main()