Home / Microsoft / Microsoft DOS / (ask) how to hide/encrypt batch script content
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: (ask) how to hide/encrypt batch script content  (Read 14758 times)
anisa
Topic Starter
Starter



Posts: 3


« on: October 27, 2008, 08:24:52 PM »


i need to hide/encrypt batch script contents from other user.
the batch file contains a username and password to SQL.

thanks
IP logged
gpl
Apprentice



Thanked: 25
Posts: 547




« Reply #1 on: October 28, 2008, 02:42:08 AM »

You could use a batch compiler

I have seen one project that wraps up a batch in an exe, then expands it on the fly - it all depends how secure you want to make it, if it is just keeping it hidden from prying eyes, that might work for you

Graham
IP logged
fireballs
Apprentice



Thanked: 3
Posts: 562

Code:Terminal

« Reply #2 on: October 28, 2008, 03:07:14 AM »

http://www.computerhope.com/download/utility/Bat_To_Exe_Converter.zip

Batch compiler. It's not amazingly secure but it does make it harder to see what's going on and reverse engineer the code.

FB
IP logged

Next time google it.
anisa
Topic Starter
Starter



Posts: 3


« Reply #3 on: October 28, 2008, 07:41:42 PM »

thanks to graham and FB

are there another way to keep extension still .bat but with content encrypted?
 
IP logged
Dias de verano
Guest
« Reply #4 on: October 29, 2008, 01:20:10 AM »

thanks to graham and FB

are there another way to keep extension still .bat but with content encrypted?
 

A batch file is a plain text file. But maybe you can make a .bat file call an exe file. Better, though, to solve the problem you seem to have with the "other user" you mentioned.

If you mean ***any*** "other user" or person who may have access to what you want to hide, and they have an indefinite amount of time available, ***any*** scheme of concealment must be regarded as crackable. A batch file would be especially leaky. The problem is that passwords are meant to be carried in people's heads. The whole point of a password is that it is never written down or stored anywhere. You did know this?

If you are thinking of one person only, who has limited batch knowledge, then something like this might work

Code: [Select]
@echo off
setlocal
%1 %0 :: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
set A=%5&set B=%6&set C=%8&set D=%3
for %%? in (1 2 3 4 5 6 7 8 9) do shift
set A=%C%%7%A%&set C=%D%%4%B%&set D=%7
for %%? in (1 2 3 4 5 6 7 8 9) do shift
echo %A% %C%%2%2 %8%D%%4!

Trouble is, if your batch knowledge is as limited as theirs is, you won't easily be able to deploy such a method, (you need to be able to understand how the code works!)  and if they read this thread, they'll know what you did!

Code: [Select]
S:\Test\Batch\encrypt>crypt-demo.bat
GOD BLESS YOU!
« Last Edit: October 29, 2008, 02:04:33 AM by Dias de verano » IP logged
Dias de verano
Guest
« Reply #5 on: October 29, 2008, 02:32:16 PM »

In fact, before thinking about encrypting the batch file, you should first get organised and use such things as user accounts and folder permissions to make sure that you are the only person who can get into the folder where it is, and the only person who can run or open it in an editor.
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / (ask) how to hide/encrypt batch script content « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.108 seconds with 20 queries.