Skip to content

Instantly share code, notes, and snippets.

@ltw
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save ltw/03189a94e8e7bd792154 to your computer and use it in GitHub Desktop.

Select an option

Save ltw/03189a94e8e7bd792154 to your computer and use it in GitHub Desktop.
Matasano Clojure CLI Client
(ns matasano.core
(:require [clojure.tools.cli :as cli]
[matasano.challenge-1 :as c1]))
(def cli-options
[["-c" "--challenge CHALLENGE" "Challenge number"
:default 1
:parse-fn #(Integer/parseInt %)]])
(defn -main
[& args]
(let [{:keys [challenge]} (:options (cli/parse-opts args cli-options))]
(case challenge
1 (c1/run))))
(defproject matasano "0.1.0-SNAPSHOT"
:description "The project for my Matasano crypto challenge solutions"
:main matasano.core
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.cli "0.3.1"]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment