12-22-2009, 11:51 PM
(12-22-2009, 11:49 PM)Extasey Wrote: In a new thread?No, to end this thread. The man wants a conversion no? Well, here is the program:
I don't mind, its not mine after all.
Code:
:: B2bat (binary to bat)
:: Author: lShadowl;The Shadow
:: Realese date:24/8/09
:: Realese version:1.0
:: Tested in Win Xp pro sp3
:: File size limit: 64kB
:: Info: Converts any file into a batch script.
:: Syntax: b2b <in file> <out script>
@echo off
:b2b
setlocal enabledelayedexpansion&& set ms=%2&& set mos=%1
if not defined ms (echo Syntax: b2b ^<in file^> ^<out script^>&& goto:eof) else (echo.Working...)
echo.exit|cmd/K prompt $_rcx$_$_q>$
echo set cx=%%1>CX.bat
debug %1<$ | find "CX">_.bat&& call _
set/a ecx=0x100+0x%cx%
set hexstr=0123456789ABCDEF&& set sz=
:loop2
set/a ths=%ecx% %% 16
call :evals %%hexstr:~%ths%,1%%
if /I %ecx% GEQ 16 (set /A ecx=%ecx%/16&& goto:loop2) else (goto:kg)
:evals
set sz=%1%sz%&& goto:eof
:kg
echo.exit|cmd/K prompt $_d 100 %sz%$_q>$
type $ | debug %1>$.t
(echo set ff=createobject("scripting.filesystemobject"^)&& echo set rr=ff.opentextfile("$.t",1^)&& echo aa = rr.readall
echo rr.close&& echo r1 = Replace(aa,">",""^)&& echo r2 = Replace(r1,"<",""^)&& echo r3 = Replace(r2,"&",""^)
echo r4 = Replace(r3,"|",""^)&& echo set bb=ff.opentextfile("$.t",2^)&& echo bb.write r4)>rp.vbs&& rp.vbs
for /f "tokens=1,* delims=]" %%A in ('"type $.t|find /n /v """') do (set "current=%%B"
if defined current (call set current=!!current:-= !!&& echo !current!>>$) else echo.>>$)
echo.exit|cmd/K prompt $_::Script by B2bat - B2bat by lShadowl$_ @echo off$_($_echo n b2bat.>%ms%
for /f "tokens=* skip=7 delims=%%a" %%a in ($) do (set csl=%%a&& echo echo e!csl:~5,53!>>%ms%)
:brk
echo exit|cmd/K prompt $_echo.$_echo rcx$_echo %sz%$_echo w$_echo q$_echo.$_)$Gda.t$A$A rem >>%ms%
echo.exit|cmd/K prompt $_debug$Lda.t$Gnul$_ren b2bat.exi %mos%$A$A rem >>%ms%
echo.Done.
goto:eof
Do what thou wilt shall be the whole of the Law. Love is the law, love under will.
.::The Rights of Man::.
.::The Rights of Man::.