Bat file Protection
-
It would be a bit like asking someone to follow a recipe that they aren't allowed to read.
-
I am having test.bat file which i created in my machine where some commands like systeminfo is present for example.The file ran in my machine and saved the file output in .bat in my machine.Then my friend also took that file and able to see the commands inside the bat.
He should not open and see that file if he opens the commands should not see the commands in it. -
I have tried one of the option ,encrypt content once the file created but the file is not running now in other machine
-
a Batch file is just a text file renamed to the .BAT extension which all PCs know to read as a set of 'keyboard' commands. You can not have a batch file and not be text readable. As @scottalanmiller pointed out - That's now how it works.
If you want something that does x and y and not be 'readable' by your 'buddy' you need to compile it into some 'application'...
-
Suggest some applications if possible ?
-
@lakshmana said in Bat file Protection:
I am having test.bat file which i created in my machine where some commands like systeminfo is present for example.The file ran in my machine and saved the file output in .bat in my machine.Then my friend also took that file and able to see the commands inside the bat.
He should not open and see that file if he opens the commands should not see the commands in it.But he SHOULD, period. How do you expect him to be able to run it if he can't see it? That's not possible.
-
@lakshmana said in Bat file Protection:
Suggest some applications if possible ?
The issue is that he should not be the one running it. You are attempting security through obscurity. In this case, you are looking for the obscurity. You need to stop and think about goals. You are trying to do something impossible.
-
Then how .exe files are created any ideas ?
-
@lakshmana said in Bat file Protection:
Then how .exe files are created any ideas ?
But I just explained that .exe can't do this either. He can still open an exe and see what it is doing.
-
Now i am having the file in encrypted which is not viewable in the PC but the file is not running in the machine B.A machine run the file
-
You need to change fundamentally what you are trying to do. Which we don't know what that is. Why do you want your friend to run this program? Clearly you don't think that he should have this access, so what is going on?
-
@lakshmana said in Bat file Protection:
Now i am having the file in encrypted which is not viewable in the PC but the file is not running in the machine B.A machine run the file
You can't run an encrypted file.
-
@scottalanmiller said in Bat file Protection:
@lakshmana said in Bat file Protection:
Then how .exe files are created any ideas ?
But I just explained that .exe can't do this either. He can still open an exe and see what it is doing.
How it able to do ?
-
I'm going to give you a future recap of where this conversation will go...
- We will explain that you can't run something that he can't see.
- You'll ask how to do what we just said you can't do.
- We'll explain again that you can't do that no matter how you modify the words.
- You'll ask again how to do the same thing in a trivially different way.
- We'll start the process over.
Until you change what you are trying to do, the answer will be "you can't do that". What you are trying to do cannot be done, no matter how you attempt to obfuscate it.
-
@scottalanmiller said in Bat file Protection:
@lakshmana said in Bat file Protection:
Now i am having the file in encrypted which is not viewable in the PC but the file is not running in the machine B.A machine run the file
You can't run an encrypted file.
Why the file got encrypted now ??It should be usable Right ?
-
@lakshmana said in Bat file Protection:
@scottalanmiller said in Bat file Protection:
@lakshmana said in Bat file Protection:
Then how .exe files are created any ideas ?
But I just explained that .exe can't do this either. He can still open an exe and see what it is doing.
How it able to do ?
Just open it with a hex editor and you can see the commands.
-
@lakshmana said in Bat file Protection:
@scottalanmiller said in Bat file Protection:
@lakshmana said in Bat file Protection:
Now i am having the file in encrypted which is not viewable in the PC but the file is not running in the machine B.A machine run the file
You can't run an encrypted file.
Why the file got encrypted now ??It should be usable Right ?
No, you have to decrypt any file to use it, always.
-
@scottalanmiller How to encrypt the bat file and decrypt it ?
-
@lakshmana said in Bat file Protection:
@scottalanmiller How to encrypt the bat file and decrypt it ?
Why are you asking about this now that you know it is useless?
-
There is no need to encrypt and decrypt that BAT file, just give your friend the BAT file. Same results.