2 Star 2 Fork 0

桔子 / MD5Check

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

MD5Check

NAME

MD5Check - Use it for init Web files's md5 values of your site(or other dir), and check if it changed.

检查web目录(或者其他重要系统目录)md5值,当目录文件变化提醒。用于文件防篡改。

SYNOPSIS

use MD5Check;

初始化目录md5值,参数为要监控的目录

新版本中,对初始化信息输出是实时输出到文件,需要自己定义输出文件句柄,可见bin/init.pl

my $mydir=shift;
print  md5init($mydir,$OutFD);

使用方法,初始化MD5值

生成执行文件,保存为fileinit.pl然后执行 perl fileinit.pl web目录

检查目录

对目录文件进行检查,只需输入之前保存的md5 文件值。

use MD5Check;
my $mydir=shift; 
print md5check($mydir);

perl filemd5check.pl  webmd5-20160920。

详细实例,见bin目录下的 init.pl 和 check.pl oneliner,perl单行程序实现功能。

###需要安装该模块,简单通过 cpanm MD5Check 安装。

$ perl -MMD5Check -e 'init("/web")' >file
$ perl -MMD5Check -e 'print md5check(file)'

新年快乐,Happy New Year!

Git repo

[github] (https://github.com/bollwarm/MD5Check)

[git@oschina] (https://git.oschina.net/ijz/MD5Check.git)

AUTHOR

[orange] linzhe@ijz.me,blog

COPYRIGHT AND LICENSE

Copyright (C) 2016 linzhe

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Comments ( 0 )

Sign in for post a comment

About

perl写的网站目录防篡改程序,perl web目录md5文件验证模块 spread retract
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Perl
1
https://git.oschina.net/ijz/MD5Check.git
git@git.oschina.net:ijz/MD5Check.git
ijz
MD5Check
MD5Check
master

Search