免费注册 查看新帖 |

Chinaunix

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

[JavaScript] linux日志清除脚本 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-07-17 06:46 |只看该作者 |倒序浏览
使用方法:
$0 options
options有:
-h 帮助
-i [ip] 查找在所有的日志文件特别IP_ADDRESS和搜索排名前20位的IP在日志文件中记录。
-d [ip] 从日志文件中删除IP
-s [虚假IP] 骗ip,当不能删除的时候
-u [用户名] 删除用户记录
-w [shell的web路径] 清除shell大小马的访问日志
-f (不建议使用,fuck的意思,清空所有日志)
-e "文件扩展名" 查找其他后门
-r [路径] 从哪开始查找,控制范围的

For Example:
Ex: $0 -h
* To show this help message
Ex: $0 -i 192.168.1.7
* To search 192.168.1.7 in all logs files. Basically finding which logs files have trace of it, and
* In addition to that, search all log files (/var/log/*) and show Top 20 most logged IP’s in log files.
* They could be good choices for spoofing
Ex: $0 -d 192.168.1.7 -s 10.1.1.7 -u “cracker”
* To delete lines containing 192.168.1.7 and|or user_name “cracker” from ASCII files, and
* To spoof 192.168.1.7 in non-ASCII files by 10.1.1.7 and user_name “cracker” by “root”
Ex: $0 -d 192.168.1.7 -s 10.1.1.7 -u “cracker” -w “/var/www/xyz.com/uploads/c99.php”
* To delete lines containing 192.168.1.7 and|or user_name “cracker” and|or web_shell_path from ASCII files, and
* To spoof 192.168.1.7 in non-ASCII files by 10.1.1.7 and user_name “cracker” by “root”
Ex: $0 -f
* To erase all log files listed in log_files.sh completely (not recommended)
Ex: $0 -e “php txt asp” -r /var/www
* To search for probable web backdoors planted on system. Once found, it is recommended to verify the result
* The current example searches for files having extensions php or txt or asp in /var/www and subdirectories
* Extensions and web_root_directory are customizable
  Linux-Log-Eraser (10.5 KiB, 7 hits)

论坛徽章:
0
2 [报告]
发表于 2014-07-17 16:07 |只看该作者
楼主的文章带给我们的是心灵深处的

论坛徽章:
0
3 [报告]
发表于 2014-07-18 00:26 |只看该作者
不看不知道,看了才知道。

论坛徽章:
0
4 [报告]
发表于 2014-07-18 08:45 |只看该作者
真不知道,还有这么好心的楼主 支持
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP