中国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-11-10 13:15
47,815 topics / 349,930 posts / today 0 new / 48,291 members
DOS批处理 & 脚本技术(批处理室) » [Original] [Discussion] Non-compiled Batch Processing Encryption Scheme and Code
Printable Version  122,648 / 364
Floor91 bhdc Posted 2006-10-20 20:03
初级用户 Posts 23 Credits 48
Just discovered that it can be like this originally, learning...
Floor92 ykkysysy Posted 2006-10-21 04:37
新手上路 Posts 4 Credits 8
Effective...Support...Thanks...! An absolute masterpiece of wisdom and technology!
Then may I ask the person above, how to re-display the content? Where there is a shield, there must be a spear, right?
Floor93 hijackjave Posted 2006-10-21 11:31
新手上路 Posts 2 Credits 3
It's so complicated~ I can't understand it~
Floor94 lxmxn Posted 2006-10-21 14:37
版主 Posts 4,938 Credits 11,386
  Still not quite clear about the principles of encryption and decryption. Please哪位 expert口述一下. Thanks.

  In addition, for the code of encryption and decryption by Brother pengfei in F82, I tested it myself and found that only the line "author:[email protected]" was added at the first line of the batch file, which seems to have no effect on encryption and decryption. I don't know the reason, hope the experts can give instruction.
Floor95 anakin Posted 2006-10-31 13:07
新手上路 Posts 4 Credits 1
I'm very noob, don't laugh at me by the old hands heh heh~~
I saw a method before very simple
That is to use a 16-bit editor to add the FFEF file header to the BAT, so that text editors like Notepad can open the batch file in UNICODE mode
But after adding it, it will cause the first command of the encrypted batch file to execute incorrectly,
We can add a 0D0A after FFFE, which is carriage return and line feed,
Although it doesn't affect the execution of the first command, but there will be an error message on the screen "It is not an internal or external command, nor is it a runnable program or batch file",
Here we can add 63 6C 73 0D 0A which is cls (carriage return)
Floor96 electronixtar Posted 2006-10-31 22:33
铂金会员 Posts 2,672 Credits 7,493
Good method from the poster above!
Floor97 8250 Posted 2006-11-01 22:22
新手上路 Posts 6 Credits 12
Reading this post has made me understand a lot of things, thank you for sharing.
Floor98 wjxsjd Posted 2006-11-03 01:23
初级用户 Posts 15 Credits 31
Learned something new!
Floor99 pengfei Posted 2006-11-19 09:43
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
Sweat... Just now the forum couldn't be accessed, and when I submitted it, it actually posted two posts.

[ Last edited by pengfei on 2006-11-19 at 09:50 AM ]
Floor100 pengfei Posted 2006-11-19 09:49
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
In the past few months on the DOS Union, I've learned a lot. I'm very touched to see that everyone here is so enthusiastic. In today's era of Windows popularity, there are still so many people who are passionately in love with DOS.

Through such a long discussion, everyone has gained a certain understanding of the encryption scheme that confuses text encoding and also learned a lot of knowledge. The encryption programs made by this encryption scheme are relatively mature and easy to use. "bat加密最终版.bat" (Final Edition of bat Encryption.bat) and "bat强制加密程序.exe" (Forced bat Encryption Program.exe)

At the same time, decryption programs for these two encryption methods have also been written. "bat解密程序.bat" (bat Decryption Program.bat)

Recently, I suddenly thought of the method of encrypting with variables. Theoretically, it seemed feasible, so I started to write "bat变量加密程序.bat" (bat Variable Encryption Program.bat). Only when I started writing did I realize it wasn't that easy. First, there was the unification of password conversion codes, and then many problems were encountered.

This algorithm is not yet very mature. Although no errors were found during testing, if control characters, operators, escape characters and other special characters; as well as symbol pairs like quotes, parentheses, environment variables, replacement variables, parameters, etc., appear in different orders in the same line, there may be encryption failures.

This is just the test code I randomly wrote. If the batch processing files that everyone actually encrypts contain such sets of characters, I think the reliability of the encrypted batch processing will be uncertain. Hehe~ Don't be afraid to use it when I say this...

I have tested dozens of batch processing files, including scripts with as many as a thousand lines. Some batch processing files also have a large number of special characters, and no errors were found after encryption. It's just that some characters may affect each other and cause unknown errors. More widespread testing by everyone is needed to find out.

Suddenly, I found that after discussing for so long, the version master of 11th floor 3742668 has already studied this encryption method. Hehe~

It is suggested that everyone first use the variable encryption method to encrypt, and then use "批处理加密解密工具集.rar" (Batch Processing Encryption and Decryption Tool Set.rar) "BAT加密最终版" (Final Edition of BAT Encryption) or "BAT强制加密程序" (Forced BAT Encryption Program) to encrypt again. This can achieve a relatively good encryption effect. If you want to see the source code, the other party needs to decrypt twice.

The defect of uppercase letters becoming lowercase after encryption has been corrected. Everyone is welcome to test~



I have rewritten these several encryption schemes and decryptions, unified the interface, etc., and the functions are more complete. The test environment is Windows XP sp2

[ Last edited by pengfei on 2007-3-6 at 04:16 AM ]

Attachments
批处理加密解密工具集.rar (64.09 KiB)
Floor101 uemuem Posted 2006-11-20 04:06
初级用户 Posts 68 Credits 153 From 上海
Originally posted by willsort at 2006-7-23 14:36:
Re pengfei:

This encryption mechanism has low versatility, is too narrow in applicable platforms, and has side effects (it will rename jpg files). Therefore, it is recommended that you do not spend too much effort on this solution.


Tested, no JPG files were renamed!
Floor102 uemuem Posted 2006-11-20 04:39
初级用户 Posts 68 Credits 153 From 上海
Originally posted by zxcv at 2006-7-23 16:10:
Simpler:
Create a new "a.txt" text file, open it, copy 【ൡ挊獬਍】(excluding 【】), paste it into "a.txt" and when saving, it prompts "Contains Unicode characters...." select "Cancel", edit..


This trick is awesome, but there is an error prompt!


Addendum: Leave the first line of the BAT to be encrypted blank, and there will be no error! ! !
:lol:
Floor103 whitecloud Posted 2006-11-21 03:10
新手上路 Posts 6 Credits 9
If it's a master, it might not be difficult... Just for novices it can be...
Floor104 ccwan Posted 2006-11-21 03:14
金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊
Moderator, this post has too much water. Can you delete some of the spam posts, including my post, to facilitate viewing and learning?
Floor105 zh159 Posted 2006-11-21 15:29
金牌会员 Posts 1,467 Credits 3,687
On the basis of building in floor 74, use "2>nul" to shield the error output of the first encrypted line

Attachments
EncryBat.rar (427 bytes)
Prev  1 … 4 5 6 7 8 9 10 … 25  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023