Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

CMD Batch Online

Nov
33
0
Hi guys! In my website i've put a .cmd batch file.
Is it possible to run that batch without to save it locally (in the hard drive)?

Thank you
 
If the CALL supported similar feature as COPY then you could avoid any explicit save.

But a small batch file (or alias) like this would do the trick:

runweb.cmd

@echo off
setlocal
set URL=user:[email protected]/folder/%1
copy %URL %TEMP%\%1 /e
iff exist %TEMP%\%1 then
call %TEMP%\%1
*del %TEMP%\%1 /q/e
else
echo %URL% not found or download error
endiff

endlocal


If you then had a batch file called mycoolbatchfile.cmd then you would use the following command to run it:

runweb.cmd mycoolbatchfile.cmd

I did a quick test of this, and it worked OK for me.

-stein
 
Thank you, but your runweb.cmd save my batch into the %temp% folder. Does exist a way to run a remote batch without to save it in the hard drive?
 
What do you suggest me to protect my batch file? I've bought a professional software to compile bat and cmd but it decompiles the source to the %temp% folder.

The ideas were to run the batch on the web or encrypt the batch and run it locally, so yesterday i've installed TCC but i don't know if it can encrypt my batch or help me in some way. I've created a GUI (with an authoring software) called "loader.exe" to launch my batch file. I can modify "loader.exe" to can pass any parameters to my batch, for example:

Run("C:\mycompiledbatch.exe","/C /parameter")

Could it useful (a parameter) to encrypt my batch?
Could TCC help me?

Thank you very much
 
I try to explain me better:

This is "mybatch.cmd":


@echo off
echo TEST OK
>nul pause
exit


With batcomp i do:

batcomp /E /O mybatch.cmd myencryptedbatch.cmd

Batcomp has now created the "myencryptedbatch.cmd" file. Editing it, i found something like this:

»$鑬뛆羬阝韂겺ᆘ邢쇳敾揞᧼查ခꣲ땂⍣粌䠋଱郗쓚㴬戀謉뮞

How can i run the "myencryptedbatch.cmd" batch file?
 
Batcomp has now created the "myencryptedbatch.cmd" file. Editing it, i found something like this:

(gribble)

How can i run the "myencryptedbatch.cmd" batch file?

Change to the directory it's in, and type MYENCRYPTEDBATCH.
 
I've opened "tcc.exe" and after changing the batch dir i type: myencryptedbatch

tcc.exe says that is an unknown command.
 
What is the command to decrypt an encrypted batch? In the Help i can only find the batcomp to encrypt.
 
What is the command to decrypt an encrypted batch? In the Help i can only find the batcomp to encrypt.
The page "Batch File Compression" says, "JP Software does not provide a utility to decompress batch files. If you use BATCOMP, make sure that you also keep a copy of the original batch file for future inspection or modification."

Compressing a .cmd file doesn't work for me either. It works for .btm.
 
Does exist a way to read the source of a .btm encrypted file? Is it secure?

I don't think it's cryptographically secure, but it's certainly a lot more obscure than a CMD.EXE batch file -- which must be in plain text for CMD.EXE to process it.
 
Thank you!

Now i've tried to encrypt a big size batch file (over 80kb). It contains several FOR / commands.

It seems that the new encrypted .btm is too long. It gives an error about a label that can't found.

If i cut some FOR commands it works. There are no errors in this batch, infact cmd.exe runs it fine.
 
Now i've tried to encrypt a big size batch file (over 80kb). It contains several FOR / commands.

It seems that the new encrypted .btm is too long. It gives an error about a label that can't found.

BATCOMP is a somewhat obsolete and elderly (originally in 4DOS) command; batch files are limited to a maximum size of 64K before compression. If you need to use BATCOMP, you'll have to break up your batch file into multiple < 64K files.
 
Back
Top
[FOX] Ultimate Translator
Translate