China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-26 18:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Trying out a new encryption idea too: View 2,653 Replies 36
Floor 16 Posted 2008-06-23 17:40 ·  中国 江苏 苏州 常熟市 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
I can't understand it for now.

But anything I can't understand should be good stuff. And since the OP helped me before, I'll bump it first.
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 17 Posted 2008-06-23 17:54 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
The following is a small batch file that I encrypted with a bulk encryption program written using this idea. Everyone, try cracking it and see:

@echo off
set /p code=请输入运行密码:
cls&call :zw
%.33%%.31%%.4%%.25%%.10% %.10%%.14%%.14%&%.19%%.31%%.6%%.5%%.10%%.4%%.27%%.5% %.31%%.18%%.27%%.32%%.5%%.31%%.22%%.31%%.5%%.27%%.17%%.31%%.22%%.31%%.15%%.2%%.27%%.18%%.19%%.13%%.10%%.18%
%.19%%.31%%.6% "%.30%%.27%%.28%=%.11% %.29% * %.24%"
for /f "tokens=1-4 delims= " %%a in ("%var%") do call :lp %%a %%b %%c %%d
%.2%%.27%%.1%%.19%%.31%>%.18%%.1%%.5%&%.8%%.10%%.6%%.10% :%.31%%.10%%.14%
:lp
for /l %%i in (1,1,9) do (
for /l %%j in (1,1,%%i) do (
set /a a=%%i%1%%j
%.13%%.14% !%.27%! %.5%%.19%%.19% 10 %.19%%.31%%.6% %.27%= !%.27%!
set str=!str! %%i%1%%j=!a!
if %%i equ %%j echo !str!&set "str="
)
)
if "%1" equ "/" goto :eof
%.19%%.25%%.13%%.14%%.6%
goto lp
pause>nul&goto :eof
:zw
for %%i in (%code%) do (set /a n+=1&call,set .%%n%%=%%i)

Whoever cracks it out (not guesses it), if nobody else says it first, I'll add 15 points.

[ Last edited by zw19750516 on 2008-6-23 at 05:56 PM ]
批处理之家新域名:www.bathome.net
Floor 18 Posted 2008-06-23 20:06 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
u p 运 c l t 运 g 运 o + 运 i f x 运 y n s 运 运 d 运 / h 运 a r - v e b @

Everything unused was replaced with the character "运"~ the 9x9 rule~^_^
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
PPdos +6 2008-06-23 20:52
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Floor 19 Posted 2008-06-23 21:22 ·  法国
高级用户
★★
Credits 783
Posts 268
Joined 2006-12-26 17:18
19-year member
UID 74627
Gender Male
Status Offline
Too late... missed **!

Since the poster above already wrote it out, I'll just talk about the line of thinking.

Because the variables are assigned in order, we find the largest index that appears, which is 33

That means the ciphertext must be at least 33 positions long (space-separated)

Then judge based on batch habits and characteristics:

For example
>%.18%%.1%%.5%


Since the ">" symbol appears, it's easy to try ">nul"

Then I can first assume the 18th position of the ciphertext is n, the 1st position is u, and the 5th position is l

And similarly:
&%.8%%.10%%.6%%.10% :%.31%%.10%%.14%


The connector & and the label colon ":" appear; when we call labels, aside from goto it's call

The form goto fits 8 10 6 10 very well, so we assume the 8th position of the ciphertext is "g", the 10th is "o"
and the 6th is "t"

If not by guessing, then it really would be hard to get out

[ Last edited by PPdos on 2008-6-23 at 02:24 PM ]
菩提本无树,明镜亦非台,本来无一物,何处惹尘埃.
Floor 20 Posted 2008-06-23 21:30 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
My god, even after reading the explanation I still don't understand it. Could some kind person explain it patiently, so an older person like me can learn too?

Especially things like %.33%%.31%%.4%%.25%%.10% — just looking at that makes my head spin, the whole thing is completely foggy, I really don't get what's going on.

I want to start with something simple, that is, from the OP's first example.

[ Last edited by quya on 2008-6-23 at 09:32 PM ]
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 21 Posted 2008-06-23 22:01 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
Originally posted by quya at 2008-6-23 09:30 PM:
My god, even after reading the explanation I still don't understand it. Could some kind person explain it patiently, so an older person like me can learn too?

Especially things like %.33%%.31%%.4%%.25%%.10% — just looking at that makes my head spin, the whole thing is completely foggy, I really ...

@echo off
set /p code=Please enter the run password:
cls&call :zw
%.33%%.31%%.4%%.25%%.10% %.10%%.14%%.14%&%.19%%.31%%.6%%.5%%.10%%.4%%.27%%.5% %.31%%.18%%.27%%.32%%.5%%.31%%.22%%.31%%.5%%.27%%.17%%.31%%.22%%.31%%.15%%.2%%.27%%.18%%.19%%.13%%.10%%.18%
%.19%%.31%%.6% "%.30%%.27%%.28%=%.11% %.29% * %.24%"
for /f "tokens=1-4 delims= " %%a in ("%var%") do call :lp %%a %%b %%c %%d
%.2%%.27%%.1%%.19%%.31%>%.18%%.1%%.5%&%.8%%.10%%.6%%.10% :%.31%%.10%%.14%
:lp
for /l %%i in (1,1,9) do (
for /l %%j in (1,1,%%i) do (
set /a a=%%i%1%%j
%.13%%.14% !%.27%! %.5%%.19%%.19% 10 %.19%%.31%%.6% %.27%= !%.27%!
set str=!str! %%i%1%%j=!a!
if %%i equ %%j echo !str!&set "str="
)
)
if "%1" equ "/" goto :eof
%.19%%.25%%.13%%.14%%.6%
goto lp
pause>nul&goto :eof
:zw
for %%i in (%code%) do (set /a n+=1&call,set .%%n%%=%%i)

That red line assigns values in sequence according to the input code...
For example, if code is a b c d e f g。。。。。。。。。。10 (10 is in the 33rd position)
When n equals 1, the value of .1 is a
When n equals 2, the value of .2 is b
When n equals 3, the value of .3 is c
.... .....
When n equals 33, the value of .33 is 10
And so on... until all values are assigned
Then it returns to the main process and continues executing downward...
%.33% will expand to 10
For example, if the value of %.31% is h
the value of %.4% is z
the value of %.25% is l
the value of %.10% is w

Then %.33%%.31%%.4%%.25%%.10% is equivalent to executing 10hzlw. That's not a command, so it will produce the error message "is not recognized as an internal or external command"...
Only after the assignment is correct will it execute properly
The correct assignment should be:
.33=@
.31=e
.4=c
.25=h
.10=o
So %.33%%.31%%.4%%.25%%.10% becomes the correct command @echo...
And whether the assignment is correct depends entirely on the order of the characters when the password is entered~
The hidden symbol @ is only assigned correctly when it is in the 33rd position... and so on...

I've explained it too tediously...
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Floor 22 Posted 2008-06-23 22:13 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
I'm too dumb, I still don't understand.

I only know things like %x%, %y%, %%i, %i, %0 , %1, %2, and so on. I don't understand %.31% — is .31 the same kind of thing as what I listed above? I'm getting hung up on this because I've never seen a variable take the form .31 before. I always thought that "." was something very profound and mysterious. Was I thinking about it the wrong way??

Also, the "_" in !_5!!_3! also seems profoundly mysterious — isn't it? Amen!

[ Last edited by quya on 2008-6-23 at 10:16 PM ]
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 23 Posted 2008-06-23 22:18 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
Originally posted by quya at 2008-6-23 10:13 PM:
I'm too dumb, I still don't understand.

I only know things like %x%, %y%, %%i, %i, %0 , %1, %2, and so on. I don't understand %.31% — is .31 the same kind of thing as what I listed above? I'm getting hung up on this because I've never ...


You're overthinking it~ You can completely remove the . or _~
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Floor 24 Posted 2008-06-23 22:22 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
Originally posted by pusofalse at 2008-6-23 10:18 PM:


You're overthinking it~ You can completely remove the . or _~


Thanks, that way I can look at it slowly. Right at the start I lost confidence.

If I don't understand something, I'll ask you all again. Thanks once more.

Also, there's one thing I can't figure out: my encryption isn't this complicated, so how come nobody has cracked mine yet?
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 25 Posted 2008-06-23 22:31 ·  法国
高级用户
★★
Credits 783
Posts 268
Joined 2006-12-26 17:18
19-year member
UID 74627
Gender Male
Status Offline
Old Taoist immortal, this is assigning a value to .


set .=haha
echo %.%
菩提本无树,明镜亦非台,本来无一物,何处惹尘埃.
Floor 26 Posted 2008-06-23 22:43 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
Originally posted by quya at 2008-6-23 10:22 PM:


Thanks, that way I can look at it slowly. Right at the start I lost confidence.

If I don't understand something, I'll ask you all again. Thanks once more.

Also, there's one thing I can't figure out: my encryption isn't this complicated, so how come nobody has cracked mine yet?

^_^ I looked at your thread... and still couldn't find where the thing to decrypt even was~
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Floor 27 Posted 2008-06-23 22:51 ·  中国 江苏 苏州 电信
高级用户
★★
五星老土
Credits 558
Posts 172
Joined 2003-02-09 00:00
23-year member
UID 881
Gender Male
From 江苏
Status Offline
Originally posted by pusofalse at 2008-6-23 10:43 PM:

^_^ I looked at your thread... and still couldn't find where the thing to decrypt even was~


It's there, I posted the part to be decrypted. The OP here also decoded 1-2 steps, but didn't get to the step I asked for. It's definitely no more complicated than this, but it's more cumbersome than this.

The original thread is here: http://www.cn-dos.net/forum/viewthread.php?tid=41040&fpage=4

[ Last edited by quya on 2008-6-26 at 06:39 PM ]
我怎么找不到一个比我注册日期早的人? 难道我是传说中的超级管理员? 其实我只是个潜水冠军而已.
Floor 28 Posted 2008-06-24 02:12 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
Originally posted by pusofalse at 2008-6-23 20:06:
u p 运 c l t 运 g 运 o + 运 i f x 运 y n s 运 运 d 运 / h 运 a r - v e b @

Everything unused was replaced with the character "运"~ the 9x9 rule~^_^

Brother, you've basically followed all my threads. To keep others from guessing it, I did tamper with it a little. If you really solved it, then please post the original text of this batch file. Maybe I really did judge a gentleman with a petty person's heart. But your solution isn't completely correct. Actually this was only to let everyone see the effect of the bulk encryption program I made. If it were really asking for decoding, it absolutely wouldn't be such a simple matter.
批处理之家新域名:www.bathome.net
Floor 29 Posted 2008-06-24 02:15 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
Originally posted by PPdos at 2008-6-23 21:22:
Too late... missed **!

Since the poster above already wrote it out, I'll just talk about the line of thinking.

Because the variables are assigned in order, we find the largest index that appears, which is 33

That means the ciphertext must be at least 33 positions long (space-separated)
...

The cracking approach is correct, and it also gave me a good suggestion for my next step in encryption (I'll make it even more unrecognizable).
批处理之家新域名:www.bathome.net
Floor 30 Posted 2008-06-24 02:45 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
bat-zw +15 2008-06-24 14:24
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Forum Jump: