1.

Solve : secrect message batch?

Answer» <html><body><p>Once I realised what "var" was, I got thinking and I was able to make the program take one input and code and decode it. I also tried something that compacts the hole thing into one file. I copied the contents of a.txt into the batch file and told it to look at itself for the key.<br/> Code: <a>[Select]</a>echo off<br/>setlocal enabledelayedexpansion<br/>set /p encode=WORD:<br/>set <a href="https://interviewquestions.tuteehub.com/tag/num-238002" style="font-weight:bold;" target="_blank" title="Click to know more about NUM">NUM</a>=0<br/><br/>:LOOPE<br/>call set tmpa=%%encode:~%num%,1%%%<br/>set /a num+=1<br/>for /f "tokens=1,2 delims==" %%a in (coder.bat) do (<br/>if "%tmpa%" equ "%%a" set enword=%enword%%%b<br/>)<br/>echo %enword%&gt; code.txt<br/>if not "%tmpa%" equ "" goto LOOPE<br/><br/>echo ENCODE: %enword%<br/>set num=0<br/><br/>:LOOPD <br/>call set tmpa=%%encode:~%num%,2%%%<br/>set /a num+=2<br/>for /f "tokens=1,2 delims==" %%a in (coder.bat) do (<br/>if "%tmpa%" equ "%%b" set deword=%deword%%%a<br/>)<br/>if not "%tmpa%" equ "" goto LOOPD<br/><br/>echo DECODE: %deword%<br/>pause<br/><br/><br/>a=87<br/>b=63<br/>c=60<br/>d=52<br/>e=76<br/>f=39<br/>g=49<br/>h=38<br/>i=31<br/>j=93<br/>k=09<br/>l=82<br/>m=72<br/>n=69<br/>o=13<br/>p=74<br/>q=85<br/>r=10<br/>s=41<br/>t=26<br/>u=61<br/>v=07<br/>w=56<br/>x=32<br/>y=12<br/>z=19<br/> =05<br/>.=30<br/>?=90<br/>,=80<br/>=36<br/>#=03<br/>$=40<br/>%=08<br/>_=70<br/>+=01<br/>*=06<br/>-=20<br/>/=//<br/>'=''<br/>:=::<br/>"=""<br/>[=[[<br/>]=]]<br/>\=\\<br/>}=}}<br/>{={{<br/>1=55<br/>2=11<br/>3=88<br/>4=77<br/>5=00<br/>6=99<br/>7=22<br/>8=77<br/>9=66<br/>0=44My file is called "coder.bat" and the output file is "code.txt". The only weird thing is that it says "pause" after the decode text. This is what you see.<br/> Code: <a>[Select]</a>WORD:i like pie.   &lt;&lt;&lt;Your input<br/>ENCODE: 3105823109760574317630   &lt;&lt;&lt;Code automaticly copyed to code.txt<br/>DECODE: goto START   &lt;&lt;&lt;Weard<br/>Press any key to continue . . .<br/><br/>WORD:3105823109760574317630   &lt;&lt;&lt;Code you paste in<br/>ENCODE: 88554400771188554466229944002277885522998844   &lt;&lt;&lt;What I call super coded<br/>DECODE: i like pie.goto START   &lt;&lt;&lt;The decoded text+pause<br/>Press any key to continue . . .<br/> Quote from: devcom on July 04, 2009, 03:29:44 PM</p><blockquote>lol Helpmeh you are 1337 <em>(<a href="https://interviewquestions.tuteehub.com/tag/read-619994" style="font-weight:bold;" target="_blank" title="Click to know more about READ">READ</a>. leet)</em>  <br/></blockquote> Oh I know what 1337 is, but are you a h4x0r? but I'm not 1337 any more...baww!<br/><br/>OP<br/>what message do you get when you try my code?This is like watching cave-men try to figure out a pair of pants.Helpmeh I think I may have <a href="https://interviewquestions.tuteehub.com/tag/put-11868" style="font-weight:bold;" target="_blank" title="Click to know more about PUT">PUT</a> it in the rong place. If you could put a few lines of code with your change in it so that it is easy to find in my file and paste it in. I am using the file above so make shour that it works with it.<br/><br/>My major problem now is that I tried to make the program loop so that you do not have to constantly open and close the batch file. What hapend is that the small pause echoing problem stated above becomes big when you go through a few codings and decodings there are many "pauses" and it is very hard to read around it and the previous text you entered also repeats. Here are the changes.<br/><br/>The goto.<br/> Code: <a>[Select]</a>if not "%tmpa%" equ "" goto LOOPD<br/><br/>echo DECODE: %deword%<br/><br/>goto START<br/>pause<br/><br/><br/>a=87<br/>It sends you here.<br/> Code: <a>[Select]</a>echo off<br/><br/>:START<br/>setlocal enabledelayedexpansion<br/>set /p encode=WORD:It is very annoying so please any suggestions would be helpfull.I have finshed the program to a point were it is useable. I've fixed the major problems and added capital letters. The only odd thing is the number 0 that shows up but I chose that and it is easily <a href="https://interviewquestions.tuteehub.com/tag/changeable-7374650" style="font-weight:bold;" target="_blank" title="Click to know more about CHANGEABLE">CHANGEABLE</a> to a nother number or even a letter if you so <a href="https://interviewquestions.tuteehub.com/tag/desire-949423" style="font-weight:bold;" target="_blank" title="Click to know more about DESIRE">DESIRE</a>. The first time you use it, it will make a file called "code.txt". That is were you can easily copy the coded mesage and past were ever you want. The first thing you will notice when you run the program is that it has a white background and black letters. I find that easier to read. The program is attached for download.<br/><br/><br/><br/>Version 3.3<br/><br/>[attachment deleted by admin]</body></html>


Discussion

No Comment Found