Skip to content

Instantly share code, notes, and snippets.

@aib
Last active August 29, 2015 14:16
Show Gist options
  • Save aib/5b29531a1e083e8b57ae to your computer and use it in GitHub Desktop.
Save aib/5b29531a1e083e8b57ae to your computer and use it in GitHub Desktop.
PythonChallenge
let a0 = 2^38
let a1 = "lost in my ghci history"
let a2 = simpleHTTP (getRequest "http://www.pythonchallenge.com/pc/def/ocr.html") >>= getResponseBody >>= return . filter isAlpha
let a3 = simpleHTTP (getRequest "http://www.pythonchallenge.com/pc/def/equality.html") >>= getResponseBody >>= return . concatMap (!!1) . ((=~ "[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]") :: String -> [[String]])
let a4_a = let dorq x = simpleHTTP (getRequest ("http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=" ++ x)) >>= getResponseBody in iterateUntilM (\x -> Debug.Trace.trace (show x) (not (x =~ "next nothing is")::Bool)) (dorq . last . words) "next nothing is 12345"
let a4_b = let dorq x = simpleHTTP (getRequest ("http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=" ++ x)) >>= getResponseBody in iterateUntilM (\x -> Debug.Trace.trace (show x) (not (x =~ "next nothing is")::Bool)) (dorq . last . words) "next nothing is 8022"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment