Last active
June 30, 2017 01:27
-
-
Save noname007/b2709350db84971d15622fadae803fa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "2.php" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo __FILE__; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
> File Name: test.c | |
> Author: | |
> Mail: | |
> Created Time: Mon 26 Jun 2017 08:35:42 PM PDT | |
************************************************************************/ | |
#include<stdio.h> | |
#include <sys/mman.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
int | |
main(int argc, char* argv[]) | |
{ | |
int fd = open("2.php", O_RDONLY); | |
struct stat s; | |
fstat(fd, &s); | |
mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0); | |
sleep(5); | |
} |
先用strace php 1.php
找到对应的 系统调用,然后构造出对应的 test.c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
根据 nikic 所説, 用 C 不能浮现问题。
for ((n=0;n<100;n++)) do ./a.out & done