Skip to content

Instantly share code, notes, and snippets.

@mythmon
mythmon / BitSquat.hs
Created July 17, 2014 20:48
Haskell to generate bitsquat domains.
{-# LANGUAGE TemplateHaskell #-}
module BitSquat where
import Data.Char
import Data.Bits
import Test.QuickCheck
flipBit :: Char -> Int -> Char
flipBit c n = chr $ xor (ord c) (2 ^ n)