|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 31 楼』:
使用 LLM 解释/回答一下
那我做个炸药 挑战一下 plp626哈……如果可以一次性搞定……你一定要教我方法!
在网吧上网,做不出什么复杂的东西了……失败……不过我拿出以前的autorun多重免疫……试试看
::应该。。。。。不会造成不良结果。适于ntfs格式的磁盘
@echo off
set /p n=在这里输入建立不可删文件个数,不判断。最好是1^<n^<50___:
for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist %%a: (
%%a: &cd\
for /f "tokens=*" %%b in ('dir /a-d /b autorun.inf') do (del /a /f /q %%b)
::如果这时候还存在autorun.inf 那应该就是删不掉的文件夹了
if exist autorun.inf goto :fail
md autorun.inf &cd autorun.inf
for /l %%d in (1,1,%n%) do (md %%d%%d &md %%d%%d\con\)
cd..
attrib autorun.inf +a +s +h +r
echo y |cacls autorun.inf /p everyone:n
))
:2
cls
echo 是否取消?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=在这里输入数字,不判断。最好是1^<n^<50___:
for %%c in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist %%c:\autorun.inf (
%%c: &cd\
echo y |cacls autorun.inf /p everyone:f
cd autorun.inf
for /l %%e in (1,1,%m%) do (rd %%e%%e\con\)
cd..
rd autorun.inf /s /q
))
exit
:fail
echo 可能已经建立了,或者遇见其他问题,按任意键到删除项。
pause>nul
goto :2
Last edited by 523066680 on 2008-3-9 at 11:09 AM ]
Then I'll make a bomb and challenge plp626... If I can get it done at once... You must teach me the method!
Surfing the Internet in an Internet cafe, can't make anything complicated... Failed... But I took out the previous autorun multiple immunity... Let's try
::Should... It won't cause bad results. Suitable for NTFS formatted disks
@echo off
set /p n=Enter the number of non-deletable files to create here, no judgment. Best is 1^<n^<50___:
for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist %%a: (
%%a: &cd\
for /f "tokens=*" %%b in ('dir /a-d /b autorun.inf') do (del /a /f /q %%b)
::If there is still autorun.inf at this time, it should be a folder that cannot be deleted
if exist autorun.inf goto :fail
md autorun.inf &cd autorun.inf
for /l %%d in (1,1,%n%) do (md %%d%%d &md %%d%%d\con\)
cd..
attrib autorun.inf +a +s +h +r
echo y |cacls autorun.inf /p everyone:n
))
:2
cls
echo Do you want to cancel?
set /p in=(y/n)
if /i %in%==y goto delete
if /i %in%==n (exit) else (goto 2)
:delete
set /p m=Enter the number here, no judgment. Best is 1^<n^<50___:
for %%c in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist %%c:\autorun.inf (
%%c: &cd\
echo y |cacls autorun.inf /p everyone:f
cd autorun.inf
for /l %%e in (1,1,%m%) do (rd %%e%%e\con\)
cd..
rd autorun.inf /s /q
))
exit
:fail
echo It may have been established, or other problems occurred, press any key to go to the delete item.
pause>nul
goto :2
Last edited by 523066680 on 2008-3-9 at 11:09 AM ]
|
|
2008-3-9 10:44 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 32 楼』:
使用 LLM 解释/回答一下
cacls设置权限和带点还是有区别。
你这里不是提供了delete?
There is a difference between setting permissions with cacls and with dots. You provided delete here?
|
|
2008-3-9 11:42 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 33 楼』:
使用 LLM 解释/回答一下
plp626 十楼的代码我可以删除了!但是更深层的就……得改下咯
开始的时候 没有加上 “ |find /v ”字节“ 结果cd.. 到了更上层的文件夹
导致我的其他文件被删除了……惨&现在没事了
因为是 tokens=4 所以 ,如果不是 长名字的文件夹
是不会被误删除的
应该说是判断方面的缺陷,我知识有限,下面的代码是在网吧做的
希望有人愿意优化下……小心哈,很容易误删外面文件夹的……
Last edited by 523066680 on 2008-3-9 at 01:11 PM ]
plp626 The code on the tenth floor I can delete! But the deeper ones... need to be modified.
At the beginning, I didn't add "|find /v "bytes"", resulting in cd.. to the upper folder, causing my other files to be deleted... So sad & now it's okay.
Because it's tokens=4, so if it's not a long-named folder, it won't be mistakenly deleted.
It should be said that it's a defect in judgment. I have limited knowledge. The following code was made in an internet cafe.
Hope someone is willing to optimize it... Be careful, it's easy to mistakenly delete the outer folder...
Last edited by 523066680 on 2008-3-9 at 01:11 PM ]
|
|
2008-3-9 12:50 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 34 楼』:
看我的,只能进入三层。 不过可以删除plp626十楼的代码
使用 LLM 解释/回答一下
=============解题错误!==浏览者请跳过======
@echo off
echo.现在开始建立畸形文件夹,这里是plp626的代码
pause
@echo off
for %%a in (plp 626 cn dos 1 0 fdf d ret 就 是 lo aux com1 nul con pp 465 漂来漂 看 ai) do (
md %%a...\ %%a...\...\
for %%a in (con nul aux com1) do (
md %%a...\%%b\
copy *.bat "%%a...\%%b\"
md %%a...\%%b\con\
) )
cls
echo. 建立完毕
pause
::\\\\\\\\\\\\\\\\\\\\\\\\开始解除、、、、、、、、、、
::这里是我的代码,如果对付更深层的代码,就又得改下了!
@echo off
for /f "skip=7 tokens=4" %%a in ('dir /ad /x ^|find /v "字节"') do (
echo %%a
cd %%a
for /f "tokens=*" %%b in ('dir /ad /b') do (
echo %%~nb
for /f "tokens=*" %%c in ('dir %%~nb\ /ad /b') do (
echo %%~nb\%%~nc\
rd %%~nb\%%~nc\ /s /q
)
rd %%~nb\ /s /q
)
cd..
echo %%a
rd %%a /s /q
)
pause
Last edited by 523066680 on 2008-8-21 at 07:22 AM ]
=============Wrong solution! ==Browsers please skip======
@echo off
echo. Now start creating a malformed folder, here is the code of plp626
pause
@echo off
for %%a in (plp 626 cn dos 1 0 fdf d ret 就是 lo aux com1 nul con pp 465 漂来漂 看 ai) do (
md %%a...\ %%a...\...\
for %%a in (con nul aux com1) do (
md %%a...\%%b\
copy *.bat "%%a...\%%b\"
md %%a...\%%b\con\
) )
cls
echo. Established
pause
::\\\\\\\\\\\\\\\\\\\\\\\\Start to remove, 、、、、、、、、、、
::Here is my code, if you deal with deeper code, you have to change it again!
@echo off
for /f "skip=7 tokens=4" %%a in ('dir /ad /x ^|find /v "bytes"') do (
echo %%a
cd %%a
for /f "tokens=*" %%b in ('dir /ad /b') do (
echo %%~nb
for /f "tokens=*" %%c in ('dir %%~nb\ /ad /b') do (
echo %%~nb\%%~nc\
rd %%~nb\%%~nc\ /s /q
)
rd %%~nb\ /s /q
)
cd..
echo %%a
rd %%a /s /q
)
pause
Last edited by 523066680 on 2008-8-21 at 07:22 AM ]
|
|
2008-3-9 12:56 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 35 楼』:
使用 LLM 解释/回答一下
老实说我不是很相信谁能写出通用的代码
con\这层是正常文件夹\nul\a..\nul\con\aux\haha.x ……挑战极限……plp626可以做到通用的话
我会崇拜你的!!偶像!看看我31楼的代码呵!评价一下
其他高手也做一下拉……所谓无私奉献!最多限制--此贴XX积分的人才可进入
当然,不能高过我的积分……<img src="images/smilies/face-smile-big.png" align="absmiddle" border="0">
Last edited by 523066680 on 2008-3-9 at 01:22 PM ]
To be honest, I'm not very convinced that anyone can write general-purpose code.
con\This layer is a normal folder\nul\a..\nul\con\aux\haha.x... Challenging the limit... If plp626 can do it generically, I will worship you!! Idol! Look at the code on my 31st floor! Give your evaluation.
Other experts also do it... The so-called selfless dedication! At most, it's restricted - only those with XX points in this post can enter. Of course, it can't be higher than my points... :D
Last edited by 523066680 on 2008-3-9 at 01:22 PM ]
|
|
2008-3-9 13:17 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 36 楼』:
使用 LLM 解释/回答一下
你们后面讨论的是删除全部文件夹还是无文件的?
你34楼的貌似全部文件夹都删除了?
Are you discussing whether to delete all folders or only those without files later? The one you posted on floor 34 seems to have deleted all folders?
|
|
2008-3-9 13:32 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 37 楼』:
使用 LLM 解释/回答一下
唉……没看清题目……
Last edited by 523066680 on 2009-3-18 at 03:34 ]
Alas... I didn't read the question clearly...
Last edited by 523066680 on 2009-3-18 at 03:34 ]
|
|
2008-3-9 14:15 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 38 楼』:
使用 LLM 解释/回答一下
层数你管它干嘛不是只有dir才可以看目录的。
你直接rd看看错误信息,再rd……掉。。。
Why do you care about the number of layers? Isn't it that only dir can be used to view directories? You can directly use rd to see the error message, and then rd... Oops...
|
|
2008-3-9 14:15 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 39 楼』:
使用 LLM 解释/回答一下
有道理……我想到--破解autorun免疫 那里去了……
这是条水贴!
That makes sense... I thought about -- the part about cracking autorun immunity...
This is a water post!
|
|
2008-3-9 14:22 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 40 楼』:
使用 LLM 解释/回答一下
似乎38楼的说法……我做不到……
It seems that what the 38th floor said... I can't do it...
|
|
2008-3-9 15:17 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
|
2008-3-9 15:30 |
|
|
523066680
银牌会员
     SuperCleaner
积分 2362
发帖 1133
注册 2008-2-2
状态 离线
|
『第 42 楼』:
使用 LLM 解释/回答一下
病毒可能比你想得还变态,
不过再变态也能干掉,我有个思路(抛砖引玉):
用2>&1来得到畸形目录的深层路径,再用for分析路径干掉所有畸形目录应该不成问题,
2>&1 我不知道是什么来的……赐教!谢谢拉
Viruses may be more perverse than you think,
But no matter how perverse they are, they can be eliminated. I have an idea (for discussion):
Using 2>&1 to get the deep path of the malformed directory, and then using for to analyze the path to eliminate all malformed directories should not be a problem,
I don't know where 2>&1 comes from... Please enlighten me! Thank you
|
|
2008-3-9 15:47 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
|
2008-3-9 15:51 |
|
|
plp626
银牌会员
     钻石会员
积分 2278
发帖 1020
注册 2007-11-19
状态 离线
|
|
2008-3-9 16:17 |
|
|
slore
铂金会员
      
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第 45 楼』:
使用 LLM 解释/回答一下
删除plp26 10楼的。。。
我只写个测试脚本,具体自己扩展吧。
建立TEST目录,在里面建立一个plp626的那个生成脚本。运行。
在TEST目录外写下面的脚本。
@echo off
rd /s /q %1\ 2>srd.log
for /f %%i in (srd.log) do rd /s /q %%i\
rd /s /q %1\ 2>srd.log
把TEST文件夹拖上来就删除了。
Delete the... on the 10th floor of plp26.
I just wrote a test script, you can expand it yourself.
Create a TEST directory, and create the generation script for plp626 in it. Run it.
Write the following script outside the TEST directory.
@echo off
rd /s /q %1\ 2>srd.log
for /f %%i in (srd.log) do rd /s /q %%i\
rd /s /q %1\ 2>srd.log
Drag the TEST folder up to delete it.
|
|
2008-3-9 16:22 |
|