hide/compile vbscript

Author Message
ATY

  • Total Posts : 25
  • Scores: 0
  • Reward points : 0
  • Joined: 4/12/2005
  • Location:
  • Status: offline
hide/compile vbscript Thursday, April 14, 2005 11:59 AM (permalink)
0
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
 
#1
    token

    • Total Posts : 1917
    • Scores: 0
    • Reward points : 0
    • Joined: 1/14/2005
    • Location:
    • Status: offline
    Re: hide/compile vbscript Thursday, April 14, 2005 12:57 PM (permalink)
    0
    Check out AutoIt from www.hiddensoft.com. It allows you to compile a script file to .exe file and/or encrypt it.


     
    #2
      token

      • Total Posts : 1917
      • Scores: 0
      • Reward points : 0
      • Joined: 1/14/2005
      • Location:
      • Status: offline
      Re: hide/compile vbscript Thursday, April 14, 2005 2:36 PM (permalink)
      0
      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.

       
      #3
        mbouchard

        • Total Posts : 2110
        • Scores: 29
        • Reward points : 0
        • Joined: 5/15/2003
        • Location: USA
        • Status: offline
        Re: hide/compile vbscript Friday, April 15, 2005 12:51 AM (permalink)
        0
        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
         
        #4
          esnmb

          • Total Posts : 453
          • Scores: 0
          • Reward points : 0
          • Joined: 1/11/2005
          • Location: USA
          • Status: offline
          Re: hide/compile vbscript Friday, April 15, 2005 1:48 AM (permalink)
          0
          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.
           
          #5
            ATY

            • Total Posts : 25
            • Scores: 0
            • Reward points : 0
            • Joined: 4/12/2005
            • Location:
            • Status: offline
            Re: hide/compile vbscript Friday, April 15, 2005 2:56 AM (permalink)
            0
            That's such a great idea Token. Thank you all
             
            #6
              mbouchard

              • Total Posts : 2110
              • Scores: 29
              • Reward points : 0
              • Joined: 5/15/2003
              • Location: USA
              • Status: offline
              Re: hide/compile vbscript Friday, April 15, 2005 5:07 AM (permalink)
              0
              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.
               
              #7
                token

                • Total Posts : 1917
                • Scores: 0
                • Reward points : 0
                • Joined: 1/14/2005
                • Location:
                • Status: offline
                Re: hide/compile vbscript Friday, April 15, 2005 5:22 AM (permalink)
                0
                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.

                 
                #8
                  ATY

                  • Total Posts : 25
                  • Scores: 0
                  • Reward points : 0
                  • Joined: 4/12/2005
                  • Location:
                  • Status: offline
                  Re: hide/compile vbscript Friday, April 15, 2005 5:52 AM (permalink)
                  0
                  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
                   
                  #9
                    token

                    • Total Posts : 1917
                    • Scores: 0
                    • Reward points : 0
                    • Joined: 1/14/2005
                    • Location:
                    • Status: offline
                    Re: hide/compile vbscript Friday, April 15, 2005 6:36 AM (permalink)
                    0
                    Was there a trailing dot at the end of the URL ?

                     
                    #10
                      Snipah

                      • Total Posts : 1339
                      • Scores: 8
                      • Reward points : 0
                      • Joined: 11/1/2004
                      • Location: Scotland
                      • Status: offline
                      Re: hide/compile vbscript Friday, April 15, 2005 6:40 AM (permalink)
                      0
                      duh....
                       
                      #11
                        ATY

                        • Total Posts : 25
                        • Scores: 0
                        • Reward points : 0
                        • Joined: 4/12/2005
                        • Location:
                        • Status: offline
                        Re: hide/compile vbscript Friday, April 15, 2005 7:58 AM (permalink)
                        0
                        stupid me...Thanks
                         
                        #12
                          mbouchard

                          • Total Posts : 2110
                          • Scores: 29
                          • Reward points : 0
                          • Joined: 5/15/2003
                          • Location: USA
                          • Status: offline
                          Re: hide/compile vbscript Friday, April 15, 2005 8:15 AM (permalink)
                          0
                          Bah, that shows me for not using the url tags. Fixed in the post
                           
                          #13
                            token

                            • Total Posts : 1917
                            • Scores: 0
                            • Reward points : 0
                            • Joined: 1/14/2005
                            • Location:
                            • Status: offline
                            Re: hide/compile vbscript Friday, April 15, 2005 9:53 AM (permalink)
                            0
                            [}:)]
                             
                            #14
                              Abyssmedia

                              • Total Posts : 3
                              • Scores: 0
                              • Reward points : 0
                              • Joined: 10/30/2007
                              • Status: offline
                              RE: Re: hide/compile vbscript Saturday, May 03, 2008 1:14 AM (permalink)
                              0
                              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.
                               
                              #15
                                everstrike

                                • Total Posts : 12
                                • Scores: 0
                                • Reward points : 0
                                • Joined: 4/12/2007
                                • Status: offline
                                Re:hide/compile vbscript Wednesday, November 30, 2011 5:25 PM (permalink)
                                0
                                You can try ExeScript or ExeScript Editor. This programs will not extract your script to disk (with Execution type=Compile). The content of your output EXE will be encrypted. Also you can password protect your output EXE file file, so you can safely use any passwords in your scripts.
                                 
                                #16

                                  Online Bookmarks Sharing: Share/Bookmark

                                  Jump to:

                                  Current active users

                                  There are 0 members and 1 guests.

                                  Icon Legend and Permission

                                  • 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
                                  • Read Message
                                  • Post New Thread
                                  • Reply to message
                                  • Post New Poll
                                  • Submit Vote
                                  • Post reward post
                                  • Delete my own posts
                                  • Delete my own threads
                                  • Rate post

                                  2000-2012 ASPPlayground.NET Forum Version 3.9