can you make a batch file into an exe

Discussion in 'Software' started by red death68, Jan 13, 2010.

  1. red death68

    red death68 Command Sergeant Major

    title says it all i would like to make a few of my batch files into exe's if at all possible so I can use them with icons and make them look nicer

    and possibly hide things like passwords stored in them
     
  2. GermanOne

    GermanOne Guest

    Hi red death68,
    the simpliest way is to ask google for bat2exe freeware ;)
    But I'm not happy with those tools. The reason is that all "compiled" codes do nothing more than write your original source code to the temp folder and run it from there. In my opinion those are more toys than tools. Good for adding colorful icons but inappropriate to hide passwords! Some of these tools results to faulty processing, because the code is running in temp. Think about variables like %0.

    Regards
    GermanOne
     
  3. red death68

    red death68 Command Sergeant Major

    so is there anyway to make them hide a password for say a password protected folder?
     
  4. GermanOne

    GermanOne Guest

    No, because batch is plain text. You can play around that nobody can recognize it at the first sight:
    Code:
    @echo off &setlocal
    set "hl9=rgQnwrz*n .th24r_rge:t35Ztz3sasdmzrjm"
    set "w1o=dlayLvn.4zj/:2wbHzjr.e heert;fd:§rPuKt37mb"
    for /f "delims=%w1O:~12,1% tokens=%hl9:~13,1%" %%a in ("%Hl9%") do set "eh5=%%ah"
    set /a p5o=%hL9:~22,2%%%%Hl9:~14,1%
    for /f "delims=%HL9:~10,1% tokens=%W1O:~13,1%,%hl9:~7,1%" %%O in ("%w1o%") do set tU1=%%P
    set /a O%P5o%s=%tu1:~-3,-2%
    call set /a Bj9=%%o%eh5:~1,1%S%%-1
    call set /a hk2=%%P%eh5:~2,1%o%%+%%b%eh5:~-3,-2%9%%-1
    call echo %%t%Tu1:~14,1%1:~-16,-15%%%%TU1:~4,1%%%%Eh5:~-7,-6%%%%%eH5:~,1%u1:~1,1%%%%EH5:~10,1%%%%Tu1:~3,1%%%%eH5:~-9,-8%%%%tu1:~6,1%%%%Eh5:~-1%%%%bJ9%%%%hK2%%
    pause
    
    ... but it never will be sure!
     
  5. red death68

    red death68 Command Sergeant Major

    hmm so basicly the only way to hide the password is hide the batch file
     
  6. SWario

    SWario Sergeant

    You could not include the password in the batch file and prompt the user for it, as long as you are using a different source to compare the password to.

    If you wanted to obscure passwords in a program, you'd have to use a language that actually runs through a compiler, and even then you're not guaranteed, but it's more work for someone to decompile it. Or you could write your code in assembly. :-D
     
  7. PEBKAC

    PEBKAC Private First Class

    I had a similar discussion in the past (in another forum) where someone wanted to encrypt a file inside of a batch file without having the passphrase in the batch file. There were no particularly easy answers...

    If you hard code a password inside of the batch file, using code to attempt to mask it--even after its converted to an executable--chances are that someone will be able to reverse engineer it and pull the password out. That's why most applications store passwords as a one-way hash.

    Another approach would be to store the password in a file somewhere that would require another set of credentials in order to access--such as a restricted access file share on a server. You could then use a "FOR" read the password into the batch file from the text file. Unfortunately, this poses its own set of risks and security problems... A plain text password on a server.

    The best solution discussed, IMHO, was to have the batch file encrypt the other files using a public key. That solution doesn't really fit your need though, because I believe you are trying to have the batch file perform a specific function only if the credentials match.
     
  8. GermanOne

    GermanOne Guest

    Nope. You have to use a real programming language, find an algorithm to hide the password (just like in my batch code) and compile it.

    Regards
    GermanOne
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds