(** ocaml-exploit

    @author Sang Kil Cha <sangkil.cha\@gmail.com>

*)
(*
    Copyright (c) 2014, Sang Kil Cha
    All rights reserved.
    This software is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License version 2, with the special exception on linking
    described in file LICENSE.

    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*)

open OcamlExploit

let _ =
  let sock = connect_tcp "localhost" 31337 in
  recv_msg sock 2048 |> print; (* receive a message and print it *)
  send_msg sock ("A" * 100);   (* repeat "A" 100 times *)
  wait ();                     (* wait for return key press *)
  disconnect sock
