# Solved algorithm decoder with table

June 24, 2015 at 15:42:42
Specs: Windows 7
 Ok so here's how this decoder works.Each character can be represented by a maximum number of 20 different numbers depending on its position.The dot between the numbers is the delimiter per each character represented.Example:aaaaaaaaaaaaaaaaaaaa = 25.62.97.206.126.243.201.76.217.231.60.132.20.229.103.26.5.6.48.124a in position 1 is 25, a in position 2 is 62.So lets take an example of a string such as:1234aathe two a's are in position 5 and 6, this means the last 2 characters (aa) encoded will be:126.243The entire table which includes all the combinations of 20 digits representing each character depending on its position can be found here:http://pastebin.com/raw.php?i=sunTvyeKSo encoding the string:1234aawill become:73.109.51.155.126.243Explanation:1 is in the first position, so using this:73.110.49.158.46.163.153.28.137.183.108.212.68.181.55.74.85.86.96.44We can see 73 is the 1st.2 is in the second position so using this:74.109.50.157.45.160.154.31.138.180.111.215.71.182.52.73.86.85.99.47We can see 109 is in the 2nd position.3 is in the third position so using this:75.108.51.156.44.161.155.30.139.181.110.214.70.183.53.72.87.84.98.46We can see 51 is in the 3rd position4 is in the 4th position so using this:76.107.52.155.43.166.156.25.140.178.105.209.65.176.50.79.80.83.101.41we can see 155 is in the 4th positiona is in the 5th position so using this:25.62.97.206.126.243.201.76.217.231.60.132.20.229.103.26.5.6.48.124we can see 126 is in the 5th position.the second a is in the 6th position so using this:25.62.97.206.126.243.201.76.217.231.60.132.20.229.103.26.5.6.48.124we can see 243 is in the 6th position, leading to:73.109.51.155.126.243Now what i want to be able to do is, enter a set of numbers with the dot delimiter which is a maximum total of 20 characters and a minimum of one and get the decoded string back.So if i enter e.g:73.109.51.155.126.243i will get:1234aaif i enter:73.109.51.155i will get:1234How can this be done in batch?I have a pretty rough idea, calculate the number of dots inside the inputted set of numbers and add one to it, that will show the number of characters.then do the for /f in () do (set a = %%aset b = %%b)depending on how many chars it is.Then do something like:type table.txt | find firstcharand then check each number set and see if position of number found matches completely, if it is, then the 1st char is found, move onto 2nd char until all characters are found.

See More: algorithm decoder with table

#1
June 25, 2015 at 02:04:36
 First, (one time only), split the alpha and the dot-numbers into two files OR a file and a one-line file consisting of the alphabet etc.. Then use FINDSTR /N with regexp to locate the position of each input dot-value in file #1, using the dot-position of each dot-sep. input data-value. The line number returned by FINDSTR will correspond to the line number or char. position in the second (Alpha) file or string.A loop takes each input dot-segment-value, combined with a counter, to get the coordinates, which are used to build the regexp search string for FINDSTR. F/E, to target "176" in the 3rd position (dot position):FINDSTR /N /R "\..*\..*\176\..*"note that each line of the search-file must be "book-ended" with a dot to avoid unnecessary hoop-jumping. That way, for each dot-offset of the input data, you will add one set of \..* to your regexp FINDSTR submission.Here's a crappy "parser":```@echo off & setlocal :1 set out= set /p x=enter dot separated integers: set x=%x:.= % set c=0 :0 call :1 %x% if not defined z goto :ex echo z: %z%--c:%c% set /a c+=1 goto :0 :1 for /L %%a in (1 1 %c%) do shift set z=%1 echo dot offset: %c% echo dot-segment value: %z% set out=!out! %1 ) goto :eof :ex echo %out% ```

Report •

#2
June 25, 2015 at 03:24:11
 I have no idea how to do what you specified in the beginning.Thank you for the effort.However, I just want a batch file that can use the table.txt file in the same directory (that text from pastebin) and use that to decode it (the set of numbers), can you provide such a script and provide the correct format of the table to be able to accomplish this?Thanks again.

Report •

#3
June 25, 2015 at 21:18:04