中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 05:56
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Batch processing encoding and decoding files (Base64 algorithm)
Printable Version  5,793 / 22
Floor1 0401 Posted 2007-01-29 04:17
中级用户 Posts 88 Credits 435




Everyone, please help test. If there are no problems, it may not be updated, and the Beta will be removed directly. The efficiency is a bit low, so everyone can make do with it. The encoding adopts the structure of大牛 Herbert Kleebauer.
Regarding the supported files, it can only go up to 64KB. First, the efficiency is too low, and there is no need to support large files. My own computer configuration is not high, and it takes more than 20 seconds to decode a 1KB file. Second, if the file is larger than 64KB, when generating the file with debug, its high address bit is in the BX register. I am too lazy to modify it, so I won't change it anymore. If you really need to encode a large file, first use RAR volume compression. Or you can modify it yourself, of course, don't forget to share it with everyone ^_^
The simplest way to encode a file is to directly drag the file onto this batch file.

Reference: Batch processing to do Base64 encoding operation Theoretical prototype

[ Last edited by 0401 on 2007-1-30 at 01:51 PM ]

Attachments
Base64.rar (2.35 KiB)
Floor2 electronixtar Posted 2007-01-29 04:49
铂金会员 Posts 2,672 Credits 7,493
I like it! Super top

Brother 0401 is awesome. Originally I made the batch Base64 to log in to the email with nc.exe, that is, to download the emails of 163 with batch processing, heh heh

Refer to this post
http://www.cn-dos.net/forum/viewthread.php?tid=24835

[ Last edited by electronixtar on 2007-1-29 at 05:12 AM ]
Floor3 electronixtar Posted 2007-01-29 05:01
铂金会员 Posts 2,672 Credits 7,493
There is also that post about automatically logging in to QQ that can solve the Base64 problem, heh, too comfortable

http://www.cn-dos.net/forum/viewthread.php?tid=27000&fpage=1&highlight=QQ
Floor4 0401 Posted 2007-01-29 05:13
中级用户 Posts 88 Credits 435
Maybe I didn't come to the forum for the past few days, so I haven't seen the post on the second floor before. But the title is very alluring. It must be cool to DIY an email sending and receiving P by myself. I'll read that post when I have time.
Floor5 redtek Posted 2007-01-29 05:13
金牌会员 Posts 1,147 Credits 2,902
Super top~~~
The brother's code and the significance of the implementation are epoch-making~:)))
Floor6 0401 Posted 2007-01-29 05:21
中级用户 Posts 88 Credits 435
Originally posted by redtek at 2007-1-29 05:13:
Super top~~~
Brother, the code and the significance of the implementation are epoch-making~ :)))))

Gently made a stroke? ^_^
Floor7 qzwqzw Posted 2007-01-29 06:40
银牌会员 Posts 636 Credits 2,343
Modify the help section a bit. Mainly to make it easier for friends who don't like to type keyboards.

Floor8 qzwqzw Posted 2007-01-29 06:49
银牌会员 Posts 636 Credits 2,343
If you make some changes

It can generate batch processing with self-decoding code

This can basically realize the independent circulation of encoded documents

Thus realizing another form of encryption/decryption
Floor9 0401 Posted 2007-01-29 07:34
中级用户 Posts 88 Credits 435
Those friends who don't like typing on the keyboard are probably Brother qzwqzw, right :) The batch processing generated from self-decoding code is feasible, but everyone can get the decoded file by running the batch processing, so there is no meaning in using this way to implement document encryption/decryption.
Floor10 electronixtar Posted 2007-01-29 07:48
铂金会员 Posts 2,672 Credits 7,493
A brand - new exe2bat is born!
Floor11 vkill Posted 2007-01-29 09:14
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
This needs to be studied carefully.
Floor12 0401 Posted 2007-01-29 10:43
中级用户 Posts 88 Credits 435
In the original file, there is this code:

There is an error in this line of set/p. That is, if you directly drag a file to this batch file, a file named B64ENC will be generated in the %userprofile% path. This is not my intention, I was negligent. Everyone should change it to:

Although it's not a big problem, I still need to change it when I find it.
__________________________________

Another bug is found. Executing directly using the file name without the extension in CMD will cause an error. Replace %0 in the next line of :help with "%~f0".

[ Last edited by 0401 on 2007-1-30 at 01:55 PM ]
Floor13 ccwan Posted 2007-01-29 20:59
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
You are a great expert, and I specially offer the highest score I can give. Also, please drop by the water area to support my post when you have time. ^_^
Floor14 Michael Posted 2007-01-30 11:01
钻石会员 Posts 3,041 Credits 10,056
Base64, I like it quite a bit.
Floor15 0401 Posted 2007-01-30 15:56
中级用户 Posts 88 Credits 435
Originally posted by electronixtar at 2007-1-29 07:48:
A brand new exe2bat is born!

I have an idea. If you simply want any2bat, you can adopt a more direct method, directly extract the value of each byte of the file and convert it to hexadecimal. When decoding, use debug to restore the file.

Originally posted by qzwqzw at 2007-1-29 06:49:
If you make some changes

Can generate a batch file with self-decoding code

This can basically realize the independent circulation of encoded documents

Thus realizing another form of encryption/decryption


I'm sorry, what I said about having no meaning is actually that I didn't figure it out myself. As long as you change the Key value in the batch file, and provide it to the batch during self-decoding. In this way, simple encryption/decryption can be achieved.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023