create_libssh2_til

summary: create a type library file

description:

The goal of this script is to demonstrate some usage of the type API. In this script:

  • We create a new libssh2-64.til file holding some libssh2 64-bit structures.

  • Once the file has been created, it can copied in the IDA install til directory or in the user IDA til directory.

level: intermediate

Attributes

libssh2_types

til

Functions

create_libssh2_til()

Module Contents

create_libssh2_til.libssh2_types = Multiline-String
Show Value
"""
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef __int64 size_t;

struct _LIBSSH2_USERAUTH_KBDINT_PROMPT
{
    unsigned char *text;
    size_t length;
    unsigned char echo;
};
typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT LIBSSH2_USERAUTH_KBDINT_PROMPT;

struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE
{
    char *text;
    unsigned int length;
};
typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE LIBSSH2_USERAUTH_KBDINT_RESPONSE;

struct _LIBSSH2_SK_SIG_INFO {
    uint8_t flags;
    uint32_t counter;
    unsigned char *sig_r;
    size_t sig_r_len;
    unsigned char *sig_s;
    size_t sig_s_len;
};
typedef struct _LIBSSH2_SK_SIG_INFO LIBSSH2_SK_SIG_INFO;

"""
create_libssh2_til.create_libssh2_til()
create_libssh2_til.til