Page 1 of 1
Batch Encryption (help)
Posted: 16 Oct 2010 10:02
by aPinoy
This is my first post in this forum so be gentle with me

what do you think i should add/remove/edit to increase/improve the "encryption" of by batch?
This is just a simple Echo command I made that displays a simple message "January imong birthday?" or in english, " Is your birthday in January"
I hope you can help me guys... esp aGerman
i'm into so-called encryption of batch right now.
Code: Select all
@echo off&set !=1 2 3 4 5 6 7 8 9&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
for %%s in ("A=%2" "B=%3" "C=%5" "D=%8" "E=%9") do set %%s
for %%# in (%!%) do shift
for %%s in ("A=%2%A%%6" "B=%A%" "C=%1%5%7%6%D%" "D=%B%%1" "E=%E%%C%%A%") do set %%s
for %%# in (%!%) do shift
color f2&echo.&echo %A%%4%B%%1%8 %C% %D%%1%3%E%%8?&echo.&pause
Re: Batch Encryption (help)
Posted: 16 Oct 2010 17:07
by aGerman
Interesting batch file.
Well, your intention was to get an encryption but this is not realy an encryption, it's an algorithm to create a special combination of letters. What I mean is if you want to let the batch file write "Yes my birthday is in january" you would need a completely new algorithm.
You should think about a rule that would be valid for each text. It may not be a complicated rule because batch is plain text and everybody who want to find out what you try to encrypt will get it
Greetings to the Philippines
aGerman
Re: Batch Encryption (help)
Posted: 16 Oct 2010 22:14
by aPinoy
thanks aGerman! you're very good, i know.
i know this is somewhat new since i made it in my own and based on my own experiences on batch. actually, i hesitated to post it here at first (because it might be copied), but duhh, i don't care. I want to share now.
if I share this, i know it will be corrected and it might become more "hard to read".
i am an "unorthodox" batch coder but not as good as you. so expect me to experiment a lot.
greetings to germany!
Re: Batch Encryption (help)
Posted: 17 Oct 2010 13:49
by aGerman
Well aPinoy, for me your batch code seems absolutely OK. It depends on what you wanna do. BTW
jeb is much better with those experimental stuff than me.
Here you will find a similar theme.
Never fear to share this here. Don't get me wrong but no credible programmer would ever use batch (or any other plain text language) for encrypting. So nobody will steal your idea to make money out of it
OK. A proposal from my site. ASCII coding is a good option for batch. For
printable ASCII characters you could use a trick that jeb showed to me: %=ExitCodeASCII% (instead of %errorlevel%).
Example:
Code: Select all
@echo off &setlocal enabledelayedexpansion
:: J a n u a r y i m o n g b i r t h d a y ?
:: ASCII (hex) 4a 61 6e 75 61 72 79 20 69 6d 6f 6e 67 20 62 69 72 74 68 64 61 79 3f
:: without spaces 4a616e7561727920696d6f6e672062697274686461793f
:: opposite f397164686472796260276e6f6d6960297271657e616a4
:: Now it's kinda unreadable ;-)
set "encrypted=f397164686472796260276e6f6d6960297271657e616a4"
set /a n=0
:loop
set "hex=!encrypted:~%n%,2!"
if "%hex%"=="" goto exitLoop
set "hex=%hex:~-1%%hex:~,1%"
set /a dec=0x%hex%
cmd /c exit %dec%
set "string=%=exitcodeascii%%string%"
set /a n+=2
goto :loop
:exitLoop
echo\!string!
pause>nul
Regards
aGerman
Re: Batch Encryption (help)
Posted: 17 Oct 2010 19:50
by ghostmachine4
Re: Batch Encryption (help)
Posted: 19 Oct 2010 09:53
by aPinoy
wah
what can i say..
you guys are so good! thanks to all of you guys.
Re: Batch Encryption (help)
Posted: 21 Oct 2010 17:18
by derek.hansen

thts rediculous!!!
can you explain how to read that quick?? jw lol