Answer the question
In order to leave comments, you need to log in
How to convert cmd code to exe?
I have a code for connecting to a webdav disk, I wrote it in a bat file for convenience, everything is fine, but you need to give it to people to connect, everyone has their own login and password, but if someone opens this file, they will see all the personal data, I thought it how to encrypt it, but I found a way to convert bat to exe
in general, this is suitable, but the first conversion program that came across did not help, that is, it does not work ..
the bat code itself
@Echo Off
ping -n 2 google.com|Find /I "TTL="|| goto Else
set login=логин
set pass=пароль
echo please wait
net use W: https://cloud.мой-сайт.com.ua/remote.php/dav/files/%login%/ /user:%login% %pass% /persistent:no
Exit
:Else
echo internet error
pause
Answer the question
In order to leave comments, you need to log in
Can rewrite so that it is required to enter (set / p) login and password, than to store it stupidly in a file?
@Echo Off
ping -n 2 google.com|Find /I "TTL="|| goto Else
set /p login=Login:
set /p pass=Password:
echo please wait
net use W: https://cloud.мой-сайт.com.ua/remote.php/dav/files/%login%/ /user:%login% %pass% /persistent:no
Exit
:Else
echo internet error
pause
cmd2exe
cmdtoexe
1. in the case of https://archive.codeplex.com/?p=bat2exe , when the resulting program is launched, the bat is first extracted and then it launches, i.e. there is no security.
2. you always need to see if the bat text is available when viewing the exe. in most cases, the resulting exe will need to be packaged or obfuscated with something else.
3. it is easier to write in a normal compiled language and then package or obfuscate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question