免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12345下一页
最近访问板块 发新帖
查看: 8532 | 回复: 42
打印 上一主题 下一主题

每天数万人的网站给我全删除了,怎么把硬盘恢复过来? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-15 10:55 |只看该作者 |倒序浏览
每天数万人的网站给我刚全删除了,怎么把硬盘恢复过来?
我只是bash <这个Linux入侵检测脚本http://bbs.chinaunix.net/forum/viewtopic.php?t=581376
我手机是13683104944 ,我愿出2000元北京朋友帮帮忙,打我手机

好多 目录都没有了

论坛徽章:
0
2 [报告]
发表于 2005-08-15 11:06 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

[root@www root]# bash <./sx_test
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
rm: cannot remove directory `/boot': Device or resource busy
rm: cannot chdir from `/dev/pts/.' to `1': Not a directory
rm: cannot remove directory `/dev/shm': Device or resource busy

[1]+  Stopped                 bash <./sx_test

论坛徽章:
0
3 [报告]
发表于 2005-08-15 11:52 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

什么网站,这么大型的网站没有备份??

论坛徽章:
0
4 [报告]
发表于 2005-08-15 12:02 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

打我电话吧,没有备份的

论坛徽章:
0
5 [报告]
发表于 2005-08-15 21:20 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

www.r-studio.com
这个软件可以恢复LINUX分区.也不贵,不过要用信用卡付的.

论坛徽章:
0
6 [报告]
发表于 2005-08-15 23:31 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

[root@www root]# bash <./sx_test
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
rm: cannot remove directory `/boot': Device or resource busy
rm: cannot chdir from `/dev/pts/.' to `1': Not a directory
rm: cannot remove directory `/dev/shm': Device or resource busy

[1]+  Stopped                 bash <./sx_test


显然这些命令都不是我那个脚本里的

论坛徽章:
0
7 [报告]
发表于 2005-08-16 00:26 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

也可以试试finaldata,死马当作活马医吧。以后要做好备份。备份就是用来为这些意外做疗伤的。

论坛徽章:
0
8 [报告]
发表于 2005-08-16 14:44 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

哦大哥,很抱歉给你带来这个问题,但是可以很明显看出的问题..

这不是我那个脚本里所执行的命令:

rm: cannot remove directory `/boot': Device or resource busy
rm: cannot chdir from `/dev/pts/.' to `1': Not a directory
rm: cannot remove directory `/dev/shm': Device or resource busy

我的脚本里没有这些东西,也没有使用shm...
我的脚本里删除文件夹只有这一行
  1. rm -rf `eval echo $resultDir/*`
复制代码


  1. resultDir="/var/ayazero"
复制代码

您可以找个懂一些Linux/Unix shell的朋友看看我脚本,绝对不会出现您的这个现象,您可能是做了一些其他的事情,可以先想想看...

另外,我脚本也是在自己机器上测试才拿出来.肯定不会出现你说的那种情况.请再找找其他原因,若有问题请给我发mail...

论坛徽章:
0
9 [报告]
发表于 2005-08-16 16:46 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

ayazero和猪兄(汗):

小弟也copy了那个脚本bash操作了一下,出现问题和楼主一样……

[root@mtest tmp]# chmod 755 script
[root@mtest tmp]# ll
total 12
-rwxr-xr-x    1 root     root         9035 Aug 16  2005 script
[root@mtest tmp]# bash < script
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
rm: cannot remove directory `/boot': Device or resource busy
rm: cannot chdir from `/dev/pts/.' to `1': Not a directory
rm: cannot remove directory `/dev/shm': Device or resource busy
rm: cannot remove directory `/home': Device or resource busy
rm: cannot chdir from `/proc/scsi/aic7xxx/.' to `0': Not a directory
rm: cannot chdir from `/proc/scsi/.' to `scsi': Not a directory
rm: cannot chdir from `/proc/.' to `mdstat': Not a directory
rm: cannot chdir from `/proc/.' to `pci': Not a directory
rm: cannot chdir from `/proc/ide/.' to `svwks': Not a directory
rm: cannot chdir from `/proc/ide/.' to `drivers': Not a directory
rm: `/proc/ide/hda/.' changed dev/ino: Operation not permitted
bash: line 27: /var/ayazero/ir: No such file or directory
Info: Detection Started...,Be sure to run this as root
Info: detecting os version info...
bash: line 30: /var/ayazero/ir: No such file or directory
bash: line 31: /var/ayazero/ir: No such file or directory
bash: line 32: /var/ayazero/ir: No such file or directory
bash: line 33: /var/ayazero/ir: No such file or directory
bash: line 34: /var/ayazero/ir: No such file or directory
bash: line 35: /var/ayazero/ir: No such file or directory
: command not found
Info: detecting Current login and CPU load...
bash: line 38: /var/ayazero/ir: No such file or directory
bash: line 39: /var/ayazero/ir: No such file or directory
bash: line 40: /var/ayazero/ir: No such file or directory
。。。 。。。

[root@mtest /]# ls
-bash: /bin/ls: No such file or directory
[root@mtest /]# dir
-bash: /usr/bin/dir: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@mtest /]#

系统壮烈牺牲……

再回头去看脚本,感觉
“mkdir $resultDir
rm -rf `eval echo $resultDir/*` ”
这里出问题了

直接“mkdir $resultDir”的结果是
[root@webbak root]# resultDir="/var/ayazero"
[root@webbak root]# mkdir $resultDir
[root@webbak root]# cd /var/
[root@webbak var]# ls
ayazero  cache  db  empty  lib  local  lock  log  lost+found  mail  named  nis  opt  preserve  run  spool  tmp  www  yp
[root@webbak var]# cd ayazero/
[root@webbak ayazero]# ls
[root@webbak ayazero]#
[root@webbak ayazero]#

证明这里是没错的……
但是我看运行“rm -rf `eval echo $resultDir/*` ”这个命令怎么好像就直接挂掉了“/”下所有文件呢?

接下来实在是不敢再试了……

同志们千万小心哪……

教训是深刻的……

重装系统去……

永远,永远,永远不要没有经过测试就直接去玩服务器!

论坛徽章:
0
10 [报告]
发表于 2005-08-16 17:37 |只看该作者

每天数万人的网站给我全删除了,怎么把硬盘恢复过来?

问题属实,怪我最后一次没有亲自测试就贴出来了

没什么好说的,我立即辞去斑竹职务,

请转告周围认识的人,不再使用该脚本,避免扩大损失!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP