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-24 05:12
中国DOS联盟论坛 » 其它操作系统综合讨论区 » [Super Skill] Abnormal Directory [Updated on 2006-10-19] View 31,967 Replies 54
Original Poster Posted 2006-05-14 23:04 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
The ingenuity of the command line is quite a lot. Here is a sort-out of techniques for creating abnormal directories

_______Last updated 2006-5-21 By est

1. Non-displayable ASCII characters
Remember to add non-displayable ASCII characters like alt+255, alt+160, etc. in the directory name, and it may not be able to be opened in Win9x ~~

2. UNICODE characters
Create a new folder in XP, edit the directory name, right-click, insert a Unicode control character, randomly choose one, and see ~~ A folder with a display length of 0 is created. (If you change the folder icon to transparent again... heh heh)

3. Adding dots
Create: Enter md D:\est..\ in cmd
Access: Run D:\est..\
Confusion: Create D:\est\. In this way, each time you open the D:\a..\ directory, you will automatically enter the D:\a\ directory ~~
Delete: rd D:\est..\
The above is adding two dots, actually you can add three, four...

4. Creating a directory name with spaces
Create: Use md "By est \ ", note: there is a space after est! The principle is to add a \ \ after the abnormal directory name, that is, \ space \.
Access: For the created directory, you can directly access it in explorer, and in cmd, use cd "By est \ "
Delete: rd /s /q "\\.\D:\By est \ ". It is better to add a quote, otherwise you will die very miserably!


5. Retaining device names
Create: md D:\con\ (Note: the \ after it! Can't be less!)
Access: Directly access in XP. But the directory cannot be directly deleted in explorer. In 2k, use run D:\con\. Unknown in 9x ~~ Should be unable to access
Delete: rd /s D:\con\ (If not working, use the above rd /s /q \\.\D:\con\)

Others like aux com1 nul, etc. are similar

Note: This restriction has been removed in Vista.


6. Ultra-long directory names
Actually, there is no technical content, just an ultra-long file name above 255 bytes. Windows cannot access it normally, but Kaba can crash ~~ Sweat ~~

7. Abnormal drive letters (not sure if it's off-topic)
The drive letters here are the familiar C: D: E: that everyone is familiar with, and the familiar command subst. Are you still familiar with the combination of the two? Please see the following example:
subst T: C:\windows Map T: to the C:\windows directory
subst 1: C:\windows See! Use numbers as drive letters!! It is completely legal in NT Cmd!
subst 晕: C:\windows晕~ Use Chinese characters as drive letters~
Complete input:

subst 晕: C:\windows
晕:
dir
notepad 晕:\system.ini
C:

Then go to "My Computer" to see? There is nothing! According to the test, many software cannot recognize digital/Chinese drive letters, so if the virus is mapped to an abnormal drive letter and run, can the anti-virus software kill it? This is a problem!

8. Dot file names of hidden folders
Everyone knows that in DOS and other OS, . represents the current directory, .. represents the parent directory, so we can use this to create abnormal directories
Create: md "D:\...\"
Access: Run D:\...\
Delete: rd /s "D:\...\"
Actually, adding more dots doesn't matter, but three dots can only be created on non-NTFS partitions! On FAT partitions, folders named . and .. can be created, and they are completely invisible in the resource manager.


The directories created by the above methods are almost impossible to access and delete normally in pure DOS and explorer, so they can be used to enhance the security and robustness of the directory!

All rights reserved. Original post of China DOS Union. Author group: est, Wu Nai He
Please indicate the original author and source when reprinting!

Please post if there are supplements!

P.S. Please ask experts to explain the principles of the above abnormal directories, as well as the application of \\.\D:\, thank you!

[ Last edited by electronixtar on 2006-10-20 at 01:20 ]
Recent Ratings for This Post ( 4 in total) Click for details
RaterScoreTime
pengfei +15 2007-01-23 10:02
wyd531 +2 2007-07-25 16:10
haiou327 +2 2007-11-18 00:50
sl543001 +4 2010-02-25 12:23
Floor 2 Posted 2006-05-15 18:31 ·  中国 上海 闵行区 电信
中级用户
★★
大师兄
Credits 377
Posts 99
Joined 2005-08-26 07:37
20-year member
UID 41945
Status Offline
High, really high! Some are really things I've never heard of :)
Floor 3 Posted 2006-05-21 23:03 ·  中国 辽宁 锦州 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
20-year member
UID 40733
Gender Male
Status Offline
Add two more:
Generate hidden folders.
1、md ..\
2、md ...\
Note that it is invalid under NTFS formatted partitions.
  ☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

Floor 4 Posted 2006-05-22 10:02 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Excuse me, upstairs: How to enter that directory? Can't access it?

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 5 Posted 2006-05-22 23:31 ·  中国 辽宁 葫芦岛 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
20-year member
UID 40733
Gender Male
Status Offline
Step by step, it can be played like this:

Assume the current directory is H:\Test\
1、dir
2、md ...\
3、dir
4、dir ....\
5、copy %windir%\system32\Drivers\etc\hosts ...\
6、dir ....\
7、notepad ...\hosts
8、cd ......\
9、notepad hosts
10、dir ..\....\
12、Win + R (Run) enter: H:\Test\...\
13、cd ..
14、del ....\hosts
15、rd ...\
16、dir

Got it? To be honest, I'm also a bit confused. After such step-by-step testing, it can be confirmed that different commands have different interpretations of "..".
  ☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

Floor 6 Posted 2006-05-23 11:21 ·  中国 上海 黄浦区 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
This reminds me of the "encryption" of DOS subdirectories that some people used to play with before. I wonder if the above-mentioned "abnormal directories" can escape the inspection of disk diagnostic software. Has anyone done such a test?

For the first one, I did an experiment on the spot in Win98 using alt+255. It can be created, entered, and deleted. As for alt+160, it may consider it as half a Chinese character, and this character cannot be input/displayed at all, so it cannot be created.
Floor 7 Posted 2006-06-11 21:56 ·  中国 云南 大理白族自治州 电信
初级用户
Credits 30
Posts 9
Joined 2006-03-22 17:06
20-year member
UID 52595
Status Offline
Thanks for your post, it really helped me a lot.
Floor 8 Posted 2006-06-12 15:44 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
There might be some typos in your input. It seems you want to express "My system can't run D:\... What's wrong?" But based on the requirements, I'll just present the translation as per the content. If the original Chinese has some unclear parts, here's a possible translation attempt: My system has issues running D:\... What's the problem? But I need to strictly follow the input. Wait, the original input is "我的系统用运行 D:\...\为效啊", which has some unclear parts. Maybe it's "My system can't run D:\... What's wrong?" But I'm not sure. However, following the rules, I'll try to translate the understandable part. "我的系统" is "My system", "用运行" might be "has issues running", "D:\...\" is "D:\...\". So it could be "My system has issues running D:\... What's wrong?" But I'm not 100% sure due to the unclear Chinese. But I have to output the translation based on the input. So the translation is: My system has issues running D:\... What's wrong? Wait, no, maybe I made a mistake. Let me start over. The input is "我的系统用运行 D:\...\为效啊", the correct translation should be according to the words. "我的系统" = "My system", "用运行" = "to run", "D:\...\" = "D:\...\". So it's "My system to run D:\...\ is not effective ah". But that's not fluent. Wait, maybe there are typos. Maybe it's "我的系统运行D:\...\没效果啊" which would be "My system running D:\...\ has no effect ah". But I have to go with the input as is. So the translation is: My system running D:\...\ is not effective ah
Floor 9 Posted 2006-06-12 17:14 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
The directory with a dot requires one more dot to be entered in "Run" than in File Explorer. For example: The displayed D:\...\ To run, it's D:\....\

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 10 Posted 2006-06-13 00:59 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Originally posted by electronixtar at 2006-6-12 05:14 PM:
The directory with dots requires one more dot to be entered in "Run" than in Windows Explorer.
For example: If it shows D:\...\, you need to enter D:\....\ to run it.


When loading the modified version of DOSLFN in pure DOS to run, you just enter as many dots as there are, without having to enter one more dot like in NT CMD.

Additionally, for those special directories (such as directories with spaces), you can directly use their corresponding short filenames to delete them. For example:

md "by est \ \"
rd byest~1 /s/q
rd byest~2 /s/q
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 11 Posted 2006-06-13 15:13 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Still, Wengier is strong~~

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 12 Posted 2006-06-14 03:06 ·  IANA 局域网IP(Private-Use)
银牌会员
★★★
颓废青年
Credits 2,265
Posts 721
Joined 2003-05-12 00:00
23-year member
UID 2032
Gender Male
Status Offline
Like the operation of attrib +h.
Floor 13 Posted 2006-06-15 15:33 ·  中国 河南 郑州 电信
中级用户
Credits 207
Posts 41
Joined 2004-10-24 00:00
21-year member
UID 32885
Gender Male
Status Offline
Tried it.
md ...\
md \...\
The effects of these two are the same. It's just that the one with two dots is hidden in the Explorer and can only be seen in CMD. But the one with three dots in md\....\ is not hidden and is like a normal folder operated in the Explorer.
I want to enter the folder built by MD\...\, but I don't know how to get in.
Floor 14 Posted 2006-06-20 10:56 ·  中国 江苏 无锡 电信
新手上路
Credits 14
Posts 7
Joined 2006-06-19 13:49
20-year member
UID 57246
Status Offline
Floor 15 Posted 2006-06-26 11:27 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 866
Posts 415
Joined 2005-12-04 11:19
20-year member
UID 46459
Status Offline
In the final analysis, I think these are all the problems inherent in DOS, and there may not be a good remedy for the time being.
Forum Jump: