Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: secrect message batch  (Read 7577 times)

0 Members and 1 Guest are viewing this topic.

Boozu

    Topic Starter


    Hopeful

    Thanked: 9
    • Yes
    • Yes
  • Certifications: List
  • Experience: Familiar
  • OS: Windows 10
Re: secrect message batch
« Reply #15 on: July 04, 2009, 06:17:07 PM »
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.
Code: [Select]
@echo off
setlocal enabledelayedexpansion
set /p encode=WORD:
set num=0

:LOOPE
call set tmpa=%%encode:~%num%,1%%%
set /a num+=1
for /f "tokens=1,2 delims==" %%a in (coder.bat) do (
if "%tmpa%" equ "%%a" set enword=%enword%%%b
)
echo %enword%> code.txt
if not "%tmpa%" equ "" goto LOOPE

echo ENCODE: %enword%
set num=0

:LOOPD
call set tmpa=%%encode:~%num%,2%%%
set /a num+=2
for /f "tokens=1,2 delims==" %%a in (coder.bat) do (
if "%tmpa%" equ "%%b" set deword=%deword%%%a
)
if not "%tmpa%" equ "" goto LOOPD

echo DECODE: %deword%
pause


a=87
b=63
c=60
d=52
e=76
f=39
g=49
h=38
i=31
j=93
k=09
l=82
m=72
n=69
o=13
p=74
q=85
r=10
s=41
t=26
u=61
v=07
w=56
x=32
y=12
z=19
 =05
.=30
?=90
,=80
@=36
#=03
$=40
%=08
_=70
+=01
*=06
-=20
/=//
'=''
:=::
"=""
[=[[
]=]]
\=\\
}=}}
{={{
1=55
2=11
3=88
4=77
5=00
6=99
7=22
8=77
9=66
0=44
My 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.
Code: [Select]
WORD:i like pie.   <<<Your input
ENCODE: 3105823109760574317630   <<<Code automaticly copyed to code.txt
DECODE: goto START   <<<Weard
Press any key to continue . . .

WORD:3105823109760574317630   <<<Code you paste in
ENCODE: 88554400771188554466229944002277885522998844   <<<What I call super coded
DECODE: i like pie.goto START   <<<The decoded text+pause
Press any key to continue . . .
« Last Edit: July 04, 2009, 08:10:03 PM by Boozu »
Don't worry about it.  If it's not good at stock, then it's not good.


Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: secrect message batch
« Reply #16 on: July 04, 2009, 08:23:36 PM »
lol Helpmeh you are 1337 (read. leet)  ;D
Oh I know what 1337 is, but are you a h4x0r? but I'm not 1337 any more...baww!

@OP
what message do you get when you try my code?
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: secrect message batch
« Reply #17 on: July 04, 2009, 09:21:45 PM »
This is like watching cave-men try to figure out a pair of pants.
I was trying to dereference Null Pointers before it was cool.

Boozu

    Topic Starter


    Hopeful

    Thanked: 9
    • Yes
    • Yes
  • Certifications: List
  • Experience: Familiar
  • OS: Windows 10
Re: secrect message batch
« Reply #18 on: July 04, 2009, 11:58:49 PM »
Helpmeh I think I may have put 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.

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.

The goto.
Code: [Select]
if not "%tmpa%" equ "" goto LOOPD

echo DECODE: %deword%

goto START
pause


a=87

It sends you here.
Code: [Select]
@echo off

:START
setlocal enabledelayedexpansion
set /p encode=WORD:
It is very annoying so please any suggestions would be helpfull.
« Last Edit: July 05, 2009, 12:14:02 AM by Boozu »
Don't worry about it.  If it's not good at stock, then it's not good.


Boozu

    Topic Starter


    Hopeful

    Thanked: 9
    • Yes
    • Yes
  • Certifications: List
  • Experience: Familiar
  • OS: Windows 10
Re: secrect message batch
« Reply #19 on: July 07, 2009, 12:04:54 AM »
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 changeable to a nother number or even a letter if you so desire. 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.



Version 3.3

[attachment deleted by admin]
Don't worry about it.  If it's not good at stock, then it's not good.