Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


hide/compile vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2698
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> hide/compile vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 hide/compile vbscript - 4/14/2005 10:59:27 AM   
  ATY

 

Posts: 25
Score: 0
Joined: 4/12/2005
From:
Status: offline
Other people are using my vbscript to retrieved files remotely. Is there anyway to hide the code so they won't be able to read the code (the userid and password is in the code).
Thanks
ATY
 
 
Post #: 1
 
 Re: hide/compile vbscript - 4/14/2005 11:57:26 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Check out AutoIt from www.hiddensoft.com. It allows you to compile a script file to .exe file and/or encrypt it.

(in reply to ATY)
 
 
Post #: 2
 
 Re: hide/compile vbscript - 4/14/2005 1:36:36 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Just a second thought, from whom do you want to hide the userId and password ? What does your code script primarily design to do ? Would the idea of creating a dedicated account for whatever purpose your script serves be a reasonable solutions and that the account ONLY has the necessary (and not over) permissions or privileges to do what it should do ?

If what you want to do is to hide the userID and password from average users, you could perhaps scramble the userID and password with manipulated strings so that it is not that EASY to immediately spot what their original values are. Of course, this would be useless for people with VBS knowledge.

For example, you could do something like the following.

temp = "Kx,26aVb^kD@#@&B4YO2=zzSAhc\kk;CV(lkk^/^.bwOR1G:JYG2bmRCdagPrh("
password = mid(right(left(mid(temp,25,37),13),7),4,2) & chr(mid(temp,4,2))

password will be "k;#8594;"

The idea is to constructe your userId and/or password in different places within the scripts so that it is NOT easy (not impossible, obviously) for average uers to immediately SEE what they are. You can even do that from within a subroutine and/or functions with various builtin functions like left, right, mid, asc, chr etc. With some careful design, it could be useful in some situations.

(in reply to ATY)
 
 
Post #: 3
 
 Re: hide/compile vbscript - 4/14/2005 11:51:31 PM   
  mbouchard


Posts: 1804
Score: 12
Joined: 5/15/2003
From: USA
Status: online
It is never a good idea to put a username/password in a script. There is no built in way to reliably encrypt a vbs. MS has a script encoder, look at technet.com, but this is easily decoded. As Token says, you can use AutoIT which has the ability to compile and encrypt an AutoIT script. But that is another language to learn, which is not too difficult. I have created an AutoIT exe that basically called a vbs with elevated privlidges. But like I said, that is combining 2 different languages and will require 2 different files. Alternativly you can check out [url]www.adminscripteditor.com[/url]. This is a script editor which has the ability to compile vbscript files. I have not used the compile function so do not know how good/bad it is.

Fixed url

(in reply to ATY)
 
 
Post #: 4
 
 Re: hide/compile vbscript - 4/15/2005 12:48:02 AM   
  esnmb

 

Posts: 431
Score: 0
Joined: 1/11/2005
From: USA
Status: offline
I use the MS script encoder myself. It is all I really need since our regular users wouldn't understand how to decode it anyway. I also use NTFS on the folder that contains my scripts to limit access to Domain Admins as well.

(in reply to ATY)
 
 
Post #: 5
 
 Re: hide/compile vbscript - 4/15/2005 1:56:53 AM   
  ATY

 

Posts: 25
Score: 0
Joined: 4/12/2005
From:
Status: offline
That's such a great idea Token. Thank you all

(in reply to ATY)
 
 
Post #: 6
 
 Re: hide/compile vbscript - 4/15/2005 4:07:07 AM   
  mbouchard


Posts: 1804
Score: 12
Joined: 5/15/2003
From: USA
Status: online
One problem I see with using tokens method is that you can still easily get the password. All you would need to do is throw up a msgbox and you got it. You might need to understand vbs or understand programming, but it can be done.

(in reply to ATY)
 
 
Post #: 7
 
 Re: hide/compile vbscript - 4/15/2005 4:22:48 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
No problem. Make sure you understand the implications of using this type of work-around ;)

mbouchard, yeah.. so don't tell them ;)

It was never meant to be anywhere near a secured or reliable method of protection (depending on who your audiences are), but it works for some.

(in reply to ATY)
 
 
Post #: 8
 
 Re: hide/compile vbscript - 4/15/2005 4:52:12 AM   
  ATY

 

Posts: 25
Score: 0
Joined: 4/12/2005
From:
Status: offline
The script is for regular users.

Mike,
I couldn't get to the site you provided.
http://www.adminscripteditor.com./ (ip address cannot be used for browsing). Thanks

(in reply to ATY)
 
 
Post #: 9
 
 Re: hide/compile vbscript - 4/15/2005 5:36:19 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Was there a trailing dot at the end of the URL ?

(in reply to ATY)
 
 
Post #: 10
 
 Re: hide/compile vbscript - 4/15/2005 5:40:50 AM   
  Snipah


Posts: 1341
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
duh....

(in reply to ATY)
 
 
Post #: 11
 
 Re: hide/compile vbscript - 4/15/2005 6:58:02 AM   
  ATY

 

Posts: 25
Score: 0
Joined: 4/12/2005
From:
Status: offline
stupid me...Thanks

(in reply to ATY)
 
 
Post #: 12
 
 Re: hide/compile vbscript - 4/15/2005 7:15:51 AM   
  mbouchard


Posts: 1804
Score: 12
Joined: 5/15/2003
From: USA
Status: online
Bah, that shows me for not using the url tags. Fixed in the post

(in reply to ATY)
 
 
Post #: 13
 
 Re: hide/compile vbscript - 4/15/2005 8:53:26 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
[}:)]

(in reply to ATY)
 
 
Post #: 14
 
 RE: Re: hide/compile vbscript - 5/3/2008 12:14:33 AM   
  Abyssmedia

 

Posts: 3
Score: 0
Joined: 10/30/2007
Status: offline
Take a look on ScriptCryptor compiler from http://www.abyssmedia.com/scriptcryptor/index.shtml
It convert VBS files to native EXE files and doesn't create any temporary files during execution.
Moreover, it support WScript object.

(in reply to token)
 
 
Post #: 15
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> hide/compile vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts