Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 931 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 931 Bytes

OCaml-Exploit

This is a collection of functions that is useful for crafting an exploit in OCaml. Build your type-safe exploitations for fun and profit.

Usage

Simply write your own exploit in a payload/ directory, and simply type make exploit_name.native to build your exploit. For example, if your exploit is written in payload/test.ml, then you type the following command to make it.

make test.native

Example

payload/test.ml contains a simple example. OCaml-Exploit provides several convenient functions such as string repetition operator (*). You can see that crafting an exploit in OCaml is now as easy as in Python.

  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