Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/libffi/testsuite/libffi.call/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     pyobjc-tc.c (2.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* Area:    ffi_call
   Purpose:    Check different structures.
   Limitations:    none.
   PR:        none.
   Originator:    Ronald Oussoren <oussoren@cistron.nl> 20030824    */

/* { dg-do run } */
#include "ffitest.h"

typedef struct Point {
    float x;
    float y;
} Point;

typedef struct Size {
    float h;
    float w;
} Size;

typedef struct Rect {
    Point o;
    Size  s;
} Rect;

int doit(int o, char* s, Point p, Rect r, int last)
{
    printf("CALLED WITH %d %s {%f %f} {{%f %f} {%f %f}} %d\n",
        o, s, p.x, p.y, r.o.x, r.o.y, r.s.h, r.s.w, last);
    return 42;
}


int main(void)
{
    ffi_type point_type;
    ffi_type size_type;
    ffi_type rect_type;
    ffi_cif cif;
    ffi_type* arglist[6];
    void* values[6];
    int r;

    /*
     *  First set up FFI types for the 3 struct types
     */

    point_type.size = 0; /*sizeof(Point);*/
    point_type.alignment = 0; /*__alignof__(Point);*/
    point_type.type = FFI_TYPE_STRUCT;
    point_type.elements = malloc(3 * sizeof(ffi_type*));
    point_type.elements[0] = &ffi_type_float;
    point_type.elements[1] = &ffi_type_float;
    point_type.elements[2] = NULL;

    size_type.size = 0;/* sizeof(Size);*/
    size_type.alignment = 0;/* __alignof__(Size);*/
    size_type.type = FFI_TYPE_STRUCT;
    size_type.elements = malloc(3 * sizeof(ffi_type*));
    size_type.elements[0] = &ffi_type_float;
    size_type.elements[1] = &ffi_type_float;
    size_type.elements[2] = NULL;

    rect_type.size = 0;/*sizeof(Rect);*/
    rect_type.alignment =0;/* __alignof__(Rect);*/
    rect_type.type = FFI_TYPE_STRUCT;
    rect_type.elements = malloc(3 * sizeof(ffi_type*));
    rect_type.elements[0] = &point_type;
    rect_type.elements[1] = &size_type;
    rect_type.elements[2] = NULL;

    /*
     * Create a CIF
     */
    arglist[0] = &ffi_type_sint;
    arglist[1] = &ffi_type_pointer;
    arglist[2] = &point_type;
    arglist[3] = &rect_type;
    arglist[4] = &ffi_type_sint;
    arglist[5] = NULL;

    r = ffi_prep_cif(&cif, FFI_DEFAULT_ABI,
            5, &ffi_type_sint, arglist);
    if (r != FFI_OK) {
        abort();
    }


    /* And call the function through the CIF */

    {
    Point p = { 1.0, 2.0 };
    Rect  r = { { 9.0, 10.0}, { -1.0, -2.0 } };
    int   o = 0;
    int   l = 42;
    char* m = "myMethod";
    ffi_arg result;

    values[0] = &o;
    values[1] = &m;
    values[2] = &p;
    values[3] = &r;
    values[4] = &l;
    values[5] = NULL;

    printf("CALLING WITH %d %s {%f %f} {{%f %f} {%f %f}} %d\n",
        o, m, p.x, p.y, r.o.x, r.o.y, r.s.h, r.s.w, l);

    ffi_call(&cif, FFI_FN(doit), &result, values);

    printf ("The result is %d\n", (int)result);

    }
    exit(0);
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0055 ]--