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-30 16:33
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Original:"Encrypt" File Another Method ------ A Sneaky Usage of the expand Command View 1,680 Replies 3
Original Poster Posted 2006-09-26 07:54 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
The expand command is used to expand one or more compressed files. For the specific usage, please look at expand /?

Everyone, try executing the following command under cmd: cd c:\ &>a.txt echo test &expand a.txt b.txt:bb &del a.txt

Now go to c:\ and see, there is an additional b.txt, and then it is found to be an empty file. The a.txt just now was obviously not an empty file. Why is it expanded to b.txt as an empty file? That's strange! Hehe

Okay, now to restore a.txt, execute: cd c:\ &expand b.txt:bb a.txt

Now see, isn't it restored again? The content of a.txt is exactly what we just wrote in with echo

Okay, now let's use this

We use it to "encrypt" files
Execute: expand source file target file:**, ** can be written randomly (I only tested writing letters). After encryption, delete the source file, so that others can't see the source file no matter what

When we need to "decrypt" the file
Execute: expand target file:** source file, just note that ** must be exactly the same as the ** used in "encryption", otherwise it can't be "decrypted"
Also, directly executing: expand target file source file is not okay

Hehe, is it easy to use? Is it practical? After testing, it can be used completely. Changing the name of the new file, copying the new file to other paths, restarting the system, etc., have no impact

Question: Why is it an empty file? How can it be restored with an empty file? I don't understand, hope the experts can explain
Everyone, come and discuss~

[ Last edited by he200377 on 2006-9-26 at 08:00 ]
Floor 2 Posted 2006-09-26 07:55 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Just can't create folders, no matter how I try, it's frustrating
Floor 3 Posted 2006-09-26 07:59 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-09-26 08:03 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
The upstairs is saying it's NTFS streams, I didn't read your that post oh, just went in and looked and was also confused
Forum Jump: