package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type file_header = private {
  1. machine : Loader_types.u16;
  2. number_of_sections : Loader_types.u16;
  3. time_date_stamp : Loader_types.u32;
  4. pointer_to_symbol_table : Loader_types.u32;
  5. number_of_symbols : Loader_types.u32;
  6. size_of_optional_header : Loader_types.u16;
  7. characteristics : Loader_types.u16;
}
type standard_fields = private {
  1. magic : Loader_types.u16;
  2. size_of_code : Loader_types.u32;
  3. size_of_initialized_data : Loader_types.u32;
  4. size_of_uninitialized_data : Loader_types.u32;
  5. address_of_entry_point : Loader_types.u32;
  6. base_of_code : Loader_types.u32;
  7. base_of_data : Loader_types.u32 option;
}
type windows_fields = private {
  1. image_base : Loader_types.u64;
  2. section_alignement : Loader_types.u32;
  3. file_alignement : Loader_types.u32;
  4. size_of_image : Loader_types.u32;
  5. size_of_headers : Loader_types.u32;
  6. checksum : Loader_types.u32;
  7. subsystem : Loader_types.u16;
  8. dll_characteristics : Loader_types.u16;
  9. size_of_stack_reserve : Loader_types.u64;
  10. size_of_stack_commit : Loader_types.u64;
  11. size_of_heap_reserve : Loader_types.u64;
  12. size_of_heap_commit : Loader_types.u64;
  13. number_of_rva_and_sizes : Loader_types.u32;
}
type data_directory = {
  1. virtual_address : Loader_types.u32;
  2. size : Loader_types.u32;
}
type data_directories = {
  1. export_directory : data_directory;
  2. import_directory : data_directory;
  3. resource_directory : data_directory;
  4. exception_directory : data_directory;
  5. security_directory : data_directory;
  6. basereloc_directory : data_directory;
  7. debug_directory : data_directory;
  8. globalptr_directory : data_directory;
  9. tls_directory : data_directory;
  10. load_config_directory : data_directory;
  11. bound_import_directory : data_directory;
  12. iat_directory : data_directory;
  13. delay_import_directory : data_directory;
  14. clr_header_directory : data_directory;
}
type optional_header = private {
  1. standard_fields : standard_fields;
  2. windows_fields : windows_fields;
  3. data_directories : data_directories;
}
type section = private {
  1. section_name : string;
  2. virtual_size : Loader_types.u32;
  3. virtual_address : Loader_types.u32;
  4. size_of_raw_data : Loader_types.u32;
  5. pointer_to_raw_data : Loader_types.u32;
  6. characteristics : Loader_types.u32;
}
type symbol = private {
  1. symbol_name : string;
  2. value : Loader_types.u32;
  3. section_number : Loader_types.u16;
  4. storage_class : Loader_types.u8;
  5. number_of_aux_symbols : Loader_types.u8;
}
include Loader_sigs.S with type Section.header = section and type Symbol.header = symbol and type Img.header = file_header * optional_header
module Section : sig ... end
module Symbol : sig ... end
module Img : sig ... end
val check_magic : Loader_buf.t -> bool
val load : Loader_buf.t -> Img.t
val load_file_descr : Unix.file_descr -> Img.t
val load_file : string -> Img.t
val read_offset : Img.t -> int -> Loader_types.u8
val read_address : Img.t -> int -> Loader_types.u8
module Offset : Loader_buf.S with type t = Img.t
module Address : Loader_buf.S with type t = Img.t
OCaml

Innovation. Community. Security.